"scripts": {
"start": "node server.js",
"watch": "nodemon",
"seed": "node server/seeders/seeds.js"
},
I downloaded some code that already has scripts. I put the code in a folder called server and now I am not able to run the scripts. (See a screenshot of my editor.) How can I run them and still keep them in the folder that I made?
CodePudding user response:
Run in root directory
npm start
Run
npm run start
To watch if you change file it will restart your application
CodePudding user response:
I always use the simplest way, try to move those pages to 'views' folder and put that folder at the root of your project folder.
There after you have to rename all those files inside the 'views' folder to .ejs extension then install ejs from npm using your cmd.
Visit https://www.npmjs.com/package/ejs to see how to use ejs, then run nodemon, I think the project will run.
The best way to sonsider is how you arrange your folders.