/Hot-Takes

Primary LanguageTypeScript

Hot Takes

Build a Secure API for a Review App



NodeJs Express MongoDB

About the project

The Secure Sauce API project provides a secure API for a pre-made front-end app. The app allows users to upload their favorite sauces, browse other sauces, and rate them. The back-end is developed in Node.js using Express and MongoDB.

Project Purpose

The purpose of this project was to create the back-end of the application, which includes building the API and implementing CRUD operations. The project focused on the following skills:

  • Implementing a data model
  • Storing data securely using a NoSQL database (MongoDB)
  • Enabling users to interact with the database through CRUD operations
  • Ensuring the security of user data and protecting it against web attacks

External FrontEnd Repository

The frontend repository for this project has already been created and can be accessed here. Please refer to the frontend repository for detailed information on the frontend implementation.

Project Setup

Backend Setup

  1. Clone this repository to your local machine.
  2. Open a terminal and navigate to the project's root directory.
  3. Install the project dependencies by running the command: npm install.
  4. Configure the MongoDB connection by setting the MONGODB_URL environment variable. Use the following format as an example:
mongodb+srv://<username>:<password>@cluster0.dllcwvg.mongodb.net/
  1. Save the MongoDB connection URL to the MONGODB_URL environment variable. This URL should include your MongoDB username, password, and cluster information.
  2. Start the backend server by running the command: npm start.
  3. The backend server should now be running on http://localhost:3000.

Frontend Setup

  1. Download the front-end repository from the provided external link.
  2. Open a terminal and navigate to the frontend directory.
  3. Install the project dependencies by running the command: npm install.
  4. Start the frontend server by running the command: npm start.
  5. The frontend server should now be running on http://localhost:4200.