/CRUD-Express-MongoDB

Try to build a simple CRUD with express for training purpose

Primary LanguageJavaScript

CRUD-Express-MongoDB

Try to build a simple CRUD with express for training purpose

Steps

  • Creates package.json to manage dependencies:
$ npm init
  • Install express:
$ npm install express --save
  • Code app listen and endpoint get with an index.html

  • Add Nodemon to daemonize server

$ npm install nodemon --save-dev
  • Add body-parser to get form data with middleware
$ npm install body-parser --save
  • Add MongoDB framework
$ npm install mongodb --save
  • Add EJS as template engine
$ npm install ejs --save
  • Launch mongo and mongo-express:
$ docker run --name mongo -d -p 27017:27017 mongo
$ docker run --link mongo:mongo -p 8081:8081 mongo-express
  • Finish CRUD front and back