0% found this document useful (0 votes)
39 views

Node Js Project

The document provides steps to use VS Code as an IDE for a MERN starter project. It explains cloning a GitHub repo, installing packages, starting the local host server, and the basic folder structure and files for backend, models, and Redux state management.

Uploaded by

jayant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Node Js Project

The document provides steps to use VS Code as an IDE for a MERN starter project. It explains cloning a GitHub repo, installing packages, starting the local host server, and the basic folder structure and files for backend, models, and Redux state management.

Uploaded by

jayant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

use vs code as ide

step 1 ==> open vs code , type ctrl+tilde(~), It will open terminal in vs code.
type 'git clone https://github.com/Hashnode/mern-starter.git' in terminal and press
enter. it will clone the basic project of mern.

step2 ==> go to dir mern-starter and type npm install. it will install packages
listed in package.json file.

step3 ==> type npm start and press enter it will start local host with port 3000.

there are two folders in mern starter . 1) client 2) server .


all backend side is handled in server folder ( apis , models, passport
authentication etc).

==> all models for services are created in model folder. and all static files like
index.html and css are created in static folder.

package.json => node package manager list all installed package with versions,
scripts npm commands that are need to run a project are mentioned in package.json
file.

api files are created in route folder perform opertaions with mongodb. api for
login and signup with authentication are created in auth.js file. api for get
menus, menu types, menu types with items, to order, get last orders by mobile
number are created in menuapoi.js file.

redux is used to keep state of data across different pages in react. so reducer are
created in reducer folder. navbarreducer file is used. there are two cases.
1) CHANGE_CARTCOUNT is for manage state of cart items with there count.
2) LOGIN_USER is for manage state of logged in user

You might also like