Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

MongoDb Instruction

/**
 * 1. Create a node server with 5 steps
 * 1.1. create folder
 * 1.2. npm init
 * 1.3. npm i express cors mongodb
 * 1.4. script-dev: nodemon index.js
 * 1.5. create index.js
 * 1.6. use 5 steps to create a node server
 * 
 * -------------------
 * Create Atlas Account
 * -------------------
 * 1. sign up. google access
 * 2. create cluster
 * 3. Create user dbUser and password
 * 4. Network Access --> ip address: allow all 
 * 5. database > Connect > code copy paste in index.js
 * ---------------------
 * CRUD Operation
 * -------------------
 * 1. node mongodb CRUD > Fundamentals
 * 2. create async run function
 * ---------------------------------------------
 * Integrate sending data from client to server
 * ----------------------------------------------
 * 1. Client side: create form
 * 2. on submit get form data and create user object
 * 3. on Server: Create user POST method to receive data on the backend 
 * 4. on client side: set fetch with POST, headers, body
 * 5. Make sure you return a json from the POST API
 * ---------------------------
 * LOAD Data to the client side
 * -------------------------------
 * 1. create get API on the server
 * 2. create a query object
 * 3. collection.find (query)
 * 4. cursor.toArray()
 * 5. return the result
 * 6. from client useEffect and display like you have done before
 * ---------------------------
 * DELETE
 * ---------------------------
*/
Comment

PREVIOUS NEXT
Code Example
Javascript :: electron hot model reload 
Javascript :: how to rotate camera around three JS object 
Javascript :: setattribute disabled javascript 
Javascript :: expo textinput caret style 
Javascript :: block enter key using jquery 
Javascript :: set empty to input date js 
Javascript :: javascript replace spaces with one space 
Javascript :: jquery set title 
Javascript :: button click javascript 
Javascript :: javascript add event listener 
Javascript :: how to put background image in angular 11 
Javascript :: codewars js Get the Middle Character 
Javascript :: js remove json value duplicates 
Javascript :: MongoNotConnectedError 
Javascript :: external button to fire dropzone.js 
Javascript :: how to only accept email in the format of name@domain.com js 
Javascript :: stun server 
Javascript :: querySelectorAll checked js 
Javascript :: how to lock device orientation using css and javascript 
Javascript :: javascript keep only letters in string 
Javascript :: react native shadow 
Javascript :: casperjs exit 
Javascript :: js get all object styles 
Javascript :: javascript regex check if string is empty 
Javascript :: remove all chars from string and leave only numbers javascript 
Javascript :: comment in vue js 
Javascript :: javascript find diff in nested objects node js 
Javascript :: node:internal/modules/cjs/loader:936 throw err; ^ 
Javascript :: jquery scroll width 
Javascript :: create hash in node js 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =