CRUD APP where you can create using post http method, update using patch method, delete using delete method (remove())
http://localhost:9000/aliens
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
version: (1.0.0)
description:
entry point: (index.js) app.js
test command:
git repository:
keywords:
author: aman
license: (ISC)
About to write to C:\Users\Admin\Desktop\CRUD REST API using Node\package.json:
{
"name": "crud-rest-api-using-node",
"version": "1.0.0",
"description": "```\r This utility will walk you through creating a package.json file.\r It only covers the most common items, and tries to guess sensible defaults.",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "aman",
"license": "ISC"
}
Is this OK? (yes)
C:\Users\Admin\Desktop\CRUD REST API using Node>
but we don't want to install in dependencies because jb hm project ko deploy krenge toh saari dependencies production server me jate hai
but hm nodemon ko nhi bhejna chahte production server pe because iski need only development ke time hai
"devDependencies": {
"nodemon": "^2.0.20"
}
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"scripts": {
"start": "nodemon app.js"
},
GET : http://localhost:9000/aliens
GET : http://localhost:9000/aliens/<id>
POST : http://localhost:9000/aliens
PATCH : http://localhost:9000/aliens/<id>