Nodemon – “clean exit – waiting for changes before restart” during setup

There are a few things wrong with your code. You never told your app to run. When you’re ready creating your routes you should start your server with:

app.listen(<port on which the server should run here>);

Also you have an Express app and a router in the same file. The router should only be used as a sub module (handy when you want to divide your app over multiple files). Right now you’re doing nothing with it. If you remove the router and the export then it should work fine.

Leave a Comment