Skip to content

KatiaDev/mern-cinema-app

Repository files navigation

cinema-project

Creating a Web API using Nodejs and Express.

Prerequisites

  • Nodejs
  • NPM
  • MongoDB/MongoAtlas
  • your preferred code editor
  • a REST client like Postman

Project Setup

  • Fork and clone the repository.
  • Create a new branch: git checkout -b <firstName-lastName>.
  • Run npm install to download dependencies.
  • Take a look at .env-example, you will need to create and setup your .env file accordingly.
  • Run the server using npm run server.

STEPS to follow:

1. First things first: Planning

Take time to plan out what data you will need, which structures will manage that data, and what functionalities you may need to update that same structures. You can use pen and paper for this, also a tool like draw.io can help you a lot. It is essential that you follow best practices and produce clean and professional results.

2. Setting up a Node development environment

Initialize the project with npm init. Improve it using express and nodemon.

3. Creating Cloudinary account

Cloudinary is the market leader in providing a comprehensive cloud-based image and video management platform. Follow this link to configure cloudinary in your project.

4. Creating Models and Routes

Use mongoose to setup the schemas.To control the requests coming from the client, create appropriate responses: GET, POST, PUT, DELETE endpoints.

5. Adding validation middlewares

6. Authentication/Authorization

7. Server side Testing

8. Deployment

API - http://api-olymp-cinema.herokuapp.com/ Client - https://olymp-cinema.vercel.app/