MERN Tutorial For Beginners
MERN Basics
YouTube Link
It comprises of MongoDB
, Express
, React
and Node
.
Of which React
is used for front-end development
And MongoDB
, Express
, Node
for back-end development
Getting Started
Follow these steps while starting the project
1. Create two Folders
Server (This contains all the back-end part)
Client (This contains all the front-end part)
2. Getting MongoDB Connection
Open Connect and click on - Connect your Application
Copy and Add your connection string into your application code
3. SERVER
1. npm init -y
this creates package.json file
2. npm install express mongoose cors nodemon
this installs these packages
3. Create index.js file, this will contain all connection information
4. Create user.js in models folder this will create or fetch user
5. User thunderclient a visual studio extension for verifying connection right from visual studio
4. CLIENT
1. npx create-react-app .
Just like regular react project use this to create default react files