Advice for Developing Locally with Node.js

Hi guys,

I hoping that someone can give me some advice on the best way to develop Apps with Node.js back-ends. I am using express and trying to implement Nodemon for hot reloading. The problem is that it is super slow, and I have found that I am better off just running the default express local server to test. This is a headache as I need to kill the server and re-run it for every change I make to my code. I have also found running tests in Node.js to be pretty slow and unreliable at times.

My computer is getting a bit older, might that be the issue? Does anyone know of some Node.js development practice that is still fast but less resource intensive?

I’m wondering if I am the only one experiencing this problem…

It’s strange that nodemon is slow for you. Is it slow to pick up on the changes, or does it take a long time to actually start your server?

For testing, I use Tape because it’s quick and simple. Check this out:

While I’m developing a feature, I prefer to run tests manually and keep them focused on the code I’m currently working on. Periodically, I will run the full suite just to check I didn’t bork anything. Testing can be slow work, especially if there’s a lot of building, tear downs, and database stuff to do. There’s no way around that but to test less at one time.

2 Likes

The server starts just as fast as the default express server, it just takes a long time for it to detect changes or it fails to detect them at all.

I will try Tape next time I test code, so far I have been using Jest.

Do you launch nodemon from the cli or gulp/grunt?

cli - from git bash on my windows 10 os.