Dev Environment Launcher

Tags

The goal to create a simple watcher that could help with running one's dev environment. Similar to something like xinetd, navigating to one.local in the above example, would handle spinning up django runserver {port} if it was not already running. This would help with the use case where I might be trying to run many django projects at once, but need to set a different port for each. Something like this may already partially be in launchd but I need to do some investigation. Perhaps modifying our environment file would automate pushing the config to launchd that's required.



[service.a]
host = "a.localhost"
port = 8000
cwd = "~/Projects/a"
command = ".venv/bin/a runserver {port}"

[service.b]
host = "b.localhost"
port = 8001
cwd = "~/Projects/b"
command = "hugo server --buildDrafts --buildFuture --port {port}"