This project was developed on Stage 8 in the Explorer course at the Rocketseat School. To access the entire course assignments click this link.
In this project, the challenge was to build an API using Node.js, this is part of a larger application that will be developed in the next two stages of the course.
A database for movie ratings was developed. Tools such as SQLite, Beekeeper Studio, and Query Builder Knex.js were used for this.
I could practice and study:
- API REST built in NodeJS e ExpressJS;
- SQLite database to save the data;
- Tool Beekeeper Studio;
- Query Builder with Knex.js;
- PM2 Advanced process manager for production Node.js applications;
- JWT with jsonwebtoken;
- Node.js middleware for handling multipart/form data;
- Promises with Async Await;
- Protect sensitive data;
- Classes and events;
- Inheritance and Polymorphism;
- Route mapping;
- Insomnia to register routes and check status codes;
- Asynchronous and promises;
- Object orientation;
- Callbacks Functions;
- ES6 Modules;
The database diagram can be seen in the image below:
This API allows for CRUD (Create, Read, Update, Delete) operations on movie ratings data. Users can add new ratings, retrieve existing ratings, update ratings, and delete ratings.
Clone the project and access the project's folder:
$ git clone git@github.com:jeadamek/rocketMovies_backend.git
$ cd rocketMovies_backend
$ cd rocket-movies-api
$ npm install
$ npm run dev
PORT Server localhost:3333
Once the API is running, users can interact with the movie ratings database by making requests to the following endpoints:
GET /ratings:
Retrieve a list of all movie ratings
POST /ratings:
Add a new movie rating
GET /ratings/:id:
Retrieve a single movie rating by ID
DELETE /ratings/:id:
Delete a movie rating by ID
POST /users:
Create a new user
PUT /users/:id:
Update user's information
PATCH /users/avatar
Upload user's avatar image
GET /tags:
Retrieve a list of all movie tags
This project is under the MIT license. See the file LICENSE for more details.
Made by Jessica Adamek. Connect with me!