It is a web application framework. Install go to the directory of app > mkdir api > cd api > npm init > npm install express --save > node app.js Or install via Express Generator generator tool, express-generator , to quickly create an application skeleton. #1 The express-generator package installs the express command-line tool. Use the following command to do so: npm install express-generator -g cd .. //go to parent path #2 For example, the following creates an Express app named api . The app will be created in a folder named api in the current working directory and the view engine will be set to Pug : express --view=pug api #3 Then install dependencies: $ cd myapp $ npm install #4 Run the app > set DEBUG=myapp:* & npm start In case, need to monitor change install nodemode > npm i -g nodemod > nodemon app.js //instead of calling npm start //Nodemon will watching for changing ...
Comments
Post a Comment