Live data from Hacker News

Ask HN: What do you use to start your dev environment faster?

news.ycombinator.com

1–10 of 23 posts

Ask HN: What do you use to start your dev environment faster?

#1
Hello there !

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 :)

Re: Ask HN: What do you use to start your dev environment faster?

#2
Aren’t node projects just npm i; npm start? Maybe clearer documentation would help. Like step by step what commands to run to build and run. It's weird I see some projects that expect contributors to figure that out themselves. Or maybe they don't want contributors.

Re: Ask HN: What do you use to start your dev environment faster?

#3

Aren’t node projects just npm i; npm start? Maybe clearer documentation would help. Like step by step what commands to run to build and run. It's weird I see some projects that expect contributors to figure that out themselves. Or maybe they don't want contributors.

I'm more asking about how you start an entire dev environment, like when you have your front 1, front 2, api 1, microservice 1-2-3-4, ... that all need to be running in order for you to start working.

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 :)

Re: Ask HN: What do you use to start your dev environment faster?

#6
Not a NodeJS dev, yet I rely a lot on boilerplates. Some developed by others, some built by me over the course of many years. For a few rather simple NodeJS projects that I worked on, https://github.com/sahat/hackathon-starter this one caught my attention and worked like a charm. For PHP / Laravel, I use https://spark.laravel.com/ . Not free but worth every penny.

Re: Ask HN: What do you use to start your dev environment faster?

#8
post #7

> I used to run some vagrant with virtualbox, but there are a lot of problems with inotify so livereload is difficult to setup. Which livereload tool do you use?

Whatever the livereload tool is (in this case it was a webpack watcher on osx), the problem is that a change on the host isn't forwarded to the guest correctly when using shared folders, so the socket server doesn't send the update notification to the browser. :/

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)

Re: Ask HN: What do you use to start your dev environment faster?

#10
The "trick" that saved me a lot of time, and my laptop from overheating, is to work on one project at a time.

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..

Post reply on HN