'npm start' with Express-Generator (NodeJS) 'npm start' with Express-Generator (NodeJS) express express

'npm start' with Express-Generator (NodeJS)


you can solve this issue easily. Go to "packages.json" file then change start :

"scripts": {    "start": "node ./bin/www"}

and make it "start": "node app.js". Then run the command npm start and the project is not going to work. Now go back and change start again to "start": "node ./bin/www" which is the default value in Express and run the command, npm start. It worked for me.


You need to check in your package.json what npm start is doing. It should have the command to start your app, and it should have a part looking something like this:

"scripts": {    "start": "node app.js"},

the app.js should have been created by the generator, but given the steps that you described it seems you forgot to generate the app. Try this:

express mynewappcd mynewappnpm installnpm start


try http://www.npmjs.com/package/gennode it's a very easy code generator module for Nodejs projects. The crud controller, route, test and documentation will be automatically generated for you. so you just have to focus on the functionality that makes your sever unique.