Git Product home page Git Product logo

mern-backend's Introduction

marp theme paginate
true
default
true

Mern Stack Backend

This is a repository intended for the mernstack backend beginners to gain all the essential knowledge along with few minor projects


Alt text


Alt text


Try to install the following softwares/tools

Let us go with the stpe by step lectures code and gain the essential knowledge


CLASS-1 -Nodejs

With all the necessary installations, we have to create seperate project folder and execute the test.js file from the terminal

Follow the steps

  • open command prompt

  • cd Desktop

  • mkdir MernStack

  • cd MernStack

  • mkdir MernStackProject

  • code .


Then visual studio code will open in the so called directory

create a new file called test.js and use the code from the Hour1-Folder from the repository

Open the terminal and type the following command in the terminal

  • node test It will run the test.js code

Now let us jump into the core concepts of Nodejs, ExpressJs and MongoDB.

We will start with NodeJs, and all of these heirarchial lectures will help to build and end to end project on your own


CLASS-2 use the code from the Hour2-Folder from the repository

  • It constitutes of files.js file which has file handling module concepts, how to read, write, delete files
  • modules.js and people.js contitues of comm. between modules(here user defined) and how exporting certain functionalities from one module impact the other one.
  • Streams.js exams the data streams from one to another , through chunks instead of doing it in one go.

Alt text


CLASS-3 use the code from the Hour3-Folder from the repository

  • It constitutes of serverSample.js file, which explains how to create a simple server using the built in modules Server listening to the request at port mentioned (here 3000)

Alt text


Use the command to run the server everytime when there is a change

  • node simpleServer

Alt text


CLASS-4 use the code from the Hour4-Folder from the repository Alt text


  • It constitutes of server.js file which has required modules and all the routing techniques to different web pages as a response from the server
  • Try to implement this file step by step instead of going all at once, so that you can understand how it is being built heirachially.

Use the command to run the server everytime when there is a change

  • node server

CLASS-5 use the code from the Hour5-Folder from the repository Alt text


  • It constitutes of server.js file which has required modules and all the routing techniques to different web pages as a response from the server using switch cases for effective routing. Alt text

  • Install packages using NPM,Install Nodemon and other packages.
  • Importance of package.json file, how to maintian the version compatibility, modules installed updated in the json file for easy reference for anyone looks for the dependencies of the project.
  • npm install -g nodemon Then use the following command hereafter to restart the server, and it is not needed to do it again and again
  • nodemon server Use this command in the terminal

Alt text


CLASS-6-Expressjs use the code from the Hour6-Folder from the repository

Alt text


  • Its a 3rd party package called Express. Express is a framework which helps us to easily create node.js web applications. Its iseasy to write clean code.

Use the following command to install Expressjs

  • npm install express

we will create a new express file called app.js and do all the simple routing and redirects.

  • **nodemon app

Alt text


CLASS-7 use the code from the Hour7-Folder from the repository

View engines allow us to inject dynamic content & variables into html templates before sending them to the browser

  • we will create a new express file called app.js and do all the simple routing and redirects.
  • npm install ejs
  • nodemon app

Alt text






CLASS-8 use the code from the Hour8-Folder from the repository Detailing about middleware, use, get fucntions Use funcations fire for every kind of request unlike get function.


Alt text


next() function to fire the next operations

  • npm install morgan For installing 3rd party middleware called morgan
  • Static middleware to restrict what to access and what cant be accessed from the browser (here style.css in public)

Alt text

Run the server

  • nodemon app

Alt text


CLASS-9 use the code from the Hour9-Folder from the repository

Alt text


we'll hook our node express app up with mongodb, a NoSQL database. Well use mongodb atlas to set up our database online Alt text

click here for db Create a free account.


Then install mangoose, a third party package

  • npm install mangoose Alt text

Alt text Run the server

  • nodemon app

Alt text


Alt text


Alt text


Alt text


Alt text


Alt text

mern-backend's People

Contributors

rames4498 avatar

Stargazers

karthik  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.