rest api with mongodb and nodejs
//using mongoose
npm i mongoose
const mongoose = require("mongoose");
mongoose
.connect(
"your mongodb URI",
{
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
useUnifiedTopology: true,
}
)
.then(() => console.log("mongodb connected"))
.catch((err) => {
console.err(err.message);
process.exit(1);
});npm install express --save
Also in JavaScript:
- javascript es6 dom manipulation
- how can auto download window print in javascript
- javascript array flat
- how to get all elements with same class in javascript
- créer composant react
- align left text in reactstrap
- Image react native
- remove whitespace with regex javascript
- how the sort function works javascript
- jquery on modal show
- convert an image into Base64 string using JavaScript
- javascript submit form with tab key
- conditional chaining chrome
- how to change a variables value in javascript
- Redux
- CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker"
- how to call function on every keypress in jquery
- data submit notification in javascript
- fullcalendar reload events ajax
- javascript select all table rows
- removes null and false values from an array
- js read a ini file
- javascript combine objects
- change version node centos