vuthysreang / taskslist_vue_express_mongodb_fullstack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FullStack Vue-Express-MongoDB

Installation server from scratch

npm init

-> To create a package.json file

npm install express cors body-parser mongodb

Install dependencies
    ==> express: is the a JavaScript Back-End Framework that used for create api/server side
    ==> cors: Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give 
        a web application running at one origin, access to selected resources from a different origin.
    ==> body-parser: Parse incoming request bodies in a middleware before our handlers, available under the req.body property.
    ==> mongodb: is a MongoDB driver that used to connect Node.js/Express.js with MongoDB database.

npm i -D nodemon

Install devDependencies
    ==> nodemon: is a tool that helps develop node. js based applications by automatically restarting the node application when file
        changes in the directory are detected. nodemon does not require any additional changes to your code or method of development
        nodemon is a replacement wrapper for node.

What is middleware?

==> Middleware functions are functions that have access to the request object ( req ), the response object ( res ), and the next
    function in the application's request-response cycle. The next function is a function in the Express router which, when invoked
    executes the middleware succeeding the current middleware.

About


Languages

Language:JavaScript 43.4%Language:Vue 37.0%Language:HTML 19.6%