https://github.com/belanasaikiran/rest-api-mongo-node
https://github.com/belanasaikiran/rest-api-mongo-node
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/belanasaikiran/rest-api-mongo-node
- Owner: belanasaikiran
- License: mit
- Created: 2022-12-28T02:29:06.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-28T02:33:30.000Z (over 2 years ago)
- Last Synced: 2025-01-31T12:48:57.097Z (4 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REST-API-Mongo-Node
> Setup Local MongoDB with Robo3T-studio app.
## Express Boiler Plate Code:
```
//jshint esversion:6const express = require("express");
const bodyParser = require("body-parser");
const ejs = require("ejs");
const mongoose = require('mongoose');const app = express();
app.set('view engine', 'ejs');
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(express.static("public"));//TODO
app.listen(3000, function() {
console.log("Server started on port 3000");
});```
## For Database:
```
{
"_id" : "5c18e1892998bdb3b3d355bf",
"title" : "REST",
"content" : "REST is short for REpresentational State Transfer. IIt's an architectural style for designing APIs."
}{
"_id" : ObjectId("5c139771d79ac8eac11e754a"),
"title" : "API",
"content" : "API stands for Application Programming Interface. It is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer."
}{
"_id" : ObjectId("5c1398aad79ac8eac11e7561"),
"title" : "Bootstrap",
"content" : "This is a framework developed by Twitter that contains pre-made front-end templates for web design"
}{
"_id" : ObjectId("5c1398ecd79ac8eac11e7567"),
"title" : "DOM",
"content" : "The Document Object Model is like an API for interacting with our HTML"
}{
"_id" : "5c18f35cde40ab6cc551cd60",
"title" : "Jack Bauer",
"content" : "Jack Bauer once stepped into quicksand. The quicksand couldn't escape and nearly drowned.",
"__v" : 0
}
```