- Fork from the repository or click use this template.
- Install nodemon globally by using
npm i -g nodemon
nodemon is just a monitor script that detects changes in your server code and rebuilds it automatically.
- Install all the dependencies by using
npm i
- Run the server script by using
npm run start
start script can be modified in the package.json file. By default it executes
nodemon server.js
.
-
You can also manually run
nodemon server.js
on your terminal to get the same result. -
The server will open on http://localhost:8000 by default. You can change the port number in the
server.js
file. By default it is
const port = 8000;