Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandhupal/restful-web-apis-with-node.js-and-express
Building RESTful Web APIs with Node.js and Express
https://github.com/sandhupal/restful-web-apis-with-node.js-and-express
expressjs mongoose nodejs nodemon restful-api
Last synced: 20 days ago
JSON representation
Building RESTful Web APIs with Node.js and Express
- Host: GitHub
- URL: https://github.com/sandhupal/restful-web-apis-with-node.js-and-express
- Owner: SandhuPal
- Created: 2019-04-17T12:41:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T18:42:11.000Z (almost 6 years ago)
- Last Synced: 2024-11-11T14:44:38.067Z (3 months ago)
- Topics: expressjs, mongoose, nodejs, nodemon, restful-api
- Language: JavaScript
- Size: 44.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RESTful-Web-APIs-with-Node.js-and-Express
Building RESTful Web APIs with Node.js and Expressnpm init = command to create a package.json
npm i --save express = Expressjs is a minimal and flexible Node.js web application framework
[install the mongoDB]
npm i --save mongoose = mongodb object modeling for node.js (writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose). Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.npm i -save nodemon = nodemon reload, automatically. Automatic restarting of application. Detects default file extension to monitor.
npm i -save-dev babel-cli babel-preset-es2015 babel-preset-stage-0 = Babel convert ECMAScript code into a backwards compatible version of JavaScript in current and older browsers or environments.
npm i -save body-parser = extract the entire body portion of an incoming request stream and exposes it on req.body. This body-parser module parses the JSON, buffer, string and URL encoded data submitted using HTTP POST request.
Robomongo (Studio 3T for mongodb) = Like postman for mongodb
//Mongoose connection
mongoose.Promise = global.Promise;
mongoose.connect("mongodb://localhost/CRMdb", {
useMongoClient: true
});//Body parser setup
app.use(
bodyParser.urlencoded({
extended: true
})
);
app.use(bodyParser.json());