Please enable JavaScript.
Coggle requires JavaScript to display documents.
Setup node js (Create file server.js (Test:
node server.js), $ npm…
Setup node js
-
$ npm install -g nodemon
instead of using node server.js, we are able to use:
$ nodemon server.js
-
- Create a folder: mkdir "Tên folder"
- Jump into that folder: cd "Tên folder"
- Start our Node project: npm init
-
-
To install Express temporarily and not add it to the dependencies list, omit the --save option:
$ npm install express
The express-generator package installs the express command-line tool.
$ npm install express-generator -g
-
Ex: the following creates an Express app named myapp. The app will be created in a folder named myapp in the current working directory and the view engine will be set to Pug:
$ express --view=pug myapp
-
run the app with this command:
$ DEBUG=myapp:* npm start
(On Windows, use this command:
set DEBUG=myapp:* & npm start)
-