/nodejs_express_base

Base nodejs using Express

Primary LanguageJavaScript

NODEJSCORE

Description:

  • Nothing to write :v

Run:

  • $ git clone
  • $ npm install
  • $ npm start
  • go to: http://localhost:3000
  • test: http://localhost:3000/users/getUserById/user_id=datpt_9981
  • custom the project according to your style :v

Unit test:

  • $ npm test

How to create nodejs simple:

  • $ cd to folder
  • $ npm init
  • $ npm install 'packet in project'
  • example $ npm install express morgan mongo nodemon --save
  • using express framework by express generator: $ npx express-generator
  • $ npm install run again to install npm in express
  • in package.js, edit "start": "node ./bin/www" to "start": "nodemon ./bin/www" using nodemon.
  • npm start to start server.
  • go to: http://localhost:3000