Intro to Backend project on freeCodeCamp. Thank you, Shivani! Watch the whole tutorial at https://www.youtube.com/watch?v=KOutPbKc9UM.
The following are the key project files.
.
├── backend
│ └── src
│ ├── config
│ │ ├── cosntants.js // Not sure this was needed
│ │ └── database.js
│ ├── controllers
│ │ ├── post.controller.js
│ │ └── user.controller.js
│ ├── models
│ │ ├── post.model.js
│ │ └── user.model.js
│ ├── routes
│ │ ├── post.route.js
│ │ └── user.route.js
│ ├── app.js
│ └── index.js
├── .env // You make this! Make a MongoDB Atlas account to set up the database connection.
├── .gitignore
├── package-lock.json
├── package.json
└── README.md
In your local checkout, you'll need an Environment file.
In the .env, include the following:
MONGODBURI=[Replace this bracket with the connection URI from MongoDB Atlas]
PORT=4000
Then, run the app with 'npm run dev' in the terminal.
The following were installed during this project:
- npm init
- npm install express
- npm i mongoose
- npm i dotenv
- npm i nodemon
- npm i bcrypt