#I'm looking for a tool to run runserver and npm start in one command with multiplexed output

31 messages ยท Page 1 of 1 (latest)

wintry lagoon
#

^

rustic leaf
#

For development? Or for production? Why must it be multiplexed? What OS ?

solid pike
#

I think you have to use two terminals

solid pike
wintry lagoon
#

Just for development

#

It needs to be multiplexed for debug output

#

Currently my team are opening two terminals and running two programs

#

I want one command that does both

rain yoke
#

Use docker compose?

wintry lagoon
#

We don't use docker

#

Also the multiplexing doesn't work well with vite

#

and breakpoint() in Django

rain yoke
#

Write a script then, but the solution you're looking for is docker compose ๐Ÿ™ƒ

#

Or tmuxp with two panes ๐Ÿค“

wintry lagoon
ripe sapphire
#

No need to write the script anymore, I use "White Noise" it runs both npm and Django together very easy to use

upbeat smelt
tepid sentinel
#

what is multiplexed output? i've used docker image with prebuilt vuejs app and fastapi running on single gunicorn server as static content before , should work with django as well

rustic leaf
#

Docker compose is the only common tool i have seen doing it - if you have multiple containers running it will merge the stdout log output from all containers into one terminal/view, and color code them so you can separate the output. So you can watch the output from all containers at once.

final roost
#

I think you want to see two logs in the same screen sorted by timestamp.
You can redirect the stdout/stderr of two programs to the same file, then you can see it all together:

program_log1 > /tmp/debug.log
program_log2 >> /tmp/debug.log
tail -f /tmp/debug.log

This is a simple shell script, you do not need more complex programs to see two logs at the same time.

Anyway, docker and docker compose is a good friend to do this and more things.

silk quail
#

I have the same structure in development environment for webpack + django dockerized project, docker is the best option for this case.

wintry lagoon
#

I want arbitrary processes without docker

final roost
wintry lagoon
#

Can you show a complete runable example?

wintry lagoon
wintry lagoon
final roost
#

test it, it works

upbeat smelt
wintry lagoon