Skip to content

Gauthiergit/First_App_NodeJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This is a course from Open Classroom. The goal is to learn how to use the backend framework of Node.js including Express and MangoDB.

After clonning the project you must run the frontend app:

cd frontend
npm install
npm run start

In the beginning you must set your database Mango DB:

  • Create an account for free on Mango DB
  • Create a cluster with free options AWS.
  • When you create your login profile choose connection with password and choose the privileges: read and write to any database (Database access tab)
  • On Network access tab click on Add IP Address and authorize access from anywhere (Add access from Anywhere).
  • From MongoDB Atlas, on Cluster tab, click on the Connect button, then click on Drivers.
  • Select the Driver Node.js.
  • Add your connection string in the file backend/app.js at the line 9.
    • Exemple: mongodb+srv://<username>:<db_password>@cluster0.cqynq.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
  • Replace <db_password> with your password and <useranme> by your database user.

In the backend you need to install some packages:

cd backend
sudo npm install mongoose
sudo npm install -g nodemon
sudo npm install --save express
sudo npm install --save mongoose-unique-validator
sudo npm install --save bcrypt
sudo npm install --save jsonwebtoken
sudo npm install --save multer

Now you can start the backend server:

cd backend
nodemon server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published