Ask HN: What do you use to start your dev environment faster?
I was wondering what you all use to setup/start your dev envs (nodejs envs most of time for me) ? I used to run some vagrant with virtualbox, but there are a lot of problems with inotify so livereload is difficult to setup and/or not efficient enough depending on the solution you find.
Or maybe do you just /npm start|docker-compose up|rails server|.+/ all of your repos manually? This is what I actually do for small projects, but you always have to help people get your stack up and running.
Tell me how you ease onboarding on your projects! Thanks for your sharing :)
[+] [-] 1ba9115454|6 years ago|reply
I have to move across a hand full of languages so having my environments all configured with docker files is pretty neat.
[+] [-] closingin|6 years ago|reply
[+] [-] gls2ro|6 years ago|reply
- https://github.com/DarthSim/overmind for running whatever is needed inside a project which has multiple things (like rails and webpacker). It is great because it uses tmux.
- A custom file (.dev-start) I put in my parent folder /project which describes what to execute in child folders (like /project/fe and /project/backend). Possible what this files does could be done with overmind but this is a setup I had before discovering overmind
- A bashrc script (a combination of bash script and bash aliases) which is executed on “cd” command and searches for .dev-start and if exists will execute. In the same script I also search for .browser-wip which is just a simple file with all the URLs I think I need to be open in browser while working on current project. If this file exists then it will open in default browser all links from there.
[+] [-] closingin|6 years ago|reply
[+] [-] SkyLinx|6 years ago|reply
[+] [-] Ramiro|6 years ago|reply
We recently wrote a post on how to integrate Okteto with NodeJS apps, in case anybody wants to try it out: https://okteto.com/blog/how-to-develop-node-apps-in-kubernet...
[+] [-] closingin|6 years ago|reply
[+] [-] Raed667|6 years ago|reply
Need to change the API? Do that and deploy it. Need to change a React app that uses the API? run it locally and call a private instance of the server instead of running both in parallel..
[+] [-] closingin|6 years ago|reply
Thanks for your reply though ! Your solution might fit people who have dedicated instances for projects.
[+] [-] wprapido|6 years ago|reply
[+] [-] potta_coffee|6 years ago|reply
[+] [-] haecceity|6 years ago|reply
[+] [-] closingin|6 years ago|reply
For example: using pm2 to start your entire stack in one command (only when it's all nodejs obviously)
It's not really related to the tech you use for every project :)
[+] [-] hauxir|6 years ago|reply
[+] [-] dvaletin|6 years ago|reply
[+] [-] bg117|6 years ago|reply
[+] [-] t_m_|6 years ago|reply
[+] [-] closingin|6 years ago|reply
You have three options to work around this : - use a polling based approach - use a plugin like https://github.com/adrienkohlbecker/vagrant-fsnotify which internally uses `touch` (this is the one i used to choose) - use an ssh mount (not sure about this one, it's been a long time)
All of these workarounds have their downsides, so I'm wondering if someone has another great approach to get a stack up and running when you have a lot of dependencies (not speaking about packages, but different sub-projects)
[+] [-] muzani|6 years ago|reply
This is a nice chart: https://xkcd.com/1205/
If you're doing it daily and it takes half an hour, you could probably dedicate 5 weeks to optimizing this.
If you're doing builds like me, it's more like 20 builds a day, each taking an extra minute. That's about a month worth of optimizing.
[+] [-] kyle_v|6 years ago|reply
[+] [-] ydnaclementine|6 years ago|reply