Skip to content

this is a backend project for a films app with posters. (Class project)

Notifications You must be signed in to change notification settings

leiteway/Hollywow-API

Repository files navigation

🎞 Hollywow-API 🎟

This project consists in the Back-end of an API called Hollywow, which consists of performing the __CRUD__ method using POST (Create), GET (Read), PUT (Update) and DELETE (Delete) requests, with several technologies.

Index

Description

We have developed the application to manage films data, to allow the users to record the information of the poster´s movies.

Project Configuration

  1. Clone the Repository:

bash

  • Copy code in your terminal: git clone https://github.com/leiteway/Hollywow-API.git
  • Copy code in your terminal: cd Hollywow-API
    To enter the repository folder.
  1. Create the file .env
  • Create the file .env located in the folder "Hollywow-API"
  • Copy the information placed on ´.env_example´ and fill it with your personal data
  1. Install Dependencies:

bash

  • Copy code: npm install
  • Copy code to make the server run: npm run dev This will start the server http://localhost:5000 using the database on MySQL Workbench.

Initialize the Postman

Doc. Postman.pdf

routes-HollywowApi

Methods in Postman to view, add, edit, and delete movie posters in our database.

GET routGet


http://localhost:5000/api
Route to do the method GET from the CRUD of our project, including our URL and an example of the response.
Captura de pantalla 2024-03-18 a las 20 22 39

DELETE routDelete


http://localhost:5000/api/
Route to do the method DELETE from the CRUD of our project, including our URL and an example of the response.
Captura de pantalla 2024-03-18 a las 20 25 10

PUT routPut


http://localhost:5000/api/4
Route to do the method PUT from the CRUD of our project, including our URL and an example of the response.
Captura de pantalla 2024-03-18 a las 20 31 21

POST routPost


http://localhost:5000/api
Route to do the method POST from the CRUD of our project, including our URL and an example of the response.
Captura de pantalla 2024-03-18 a las 20 31 56

GET routGetById


http://localhost:5000/api/
Route to do the method GET BY ID from the CRUD of our project, including our URL and an example of the response.
Captura de pantalla 2024-03-18 a las 20 29 43

Test

  • Copy code: npm run test This will run the tests.

Project Structure

  • controllers: to handle HTTP requests.
  • database: configuration of connections with the database.
  • helpers: contains the import and export validations from express-validator.
  • models: the model of database.
  • node_modules: contains all the dependencies of your project. When you install packages using npm, they are stored here.
  • routes: route definitions for the methods of the API.
  • test: unit and integration tests in one file.
  • validators: contains the validations of the methods of the CRUD.
  • .env: is a configuration file commonly used to store environment variables.
  • .gitignore: specifies files and folders ignored by Git to prevent irrelevant or automatically generated files from being tracked.
  • app.js: entry point of the application.
  • config.js: application configuration, such as database and server configuration.
  • package.json and package-lock.json: these files contain metadata about your project and its dependencies. They also include scripts for running various tasks like starting the development server or building the production bundle.
  • README.md: this file typically contains instructions on how to set up and run your project, as well as any other relevant information for contributors or users.

Technologies

                         

Authors

Contributions

Contributions are welcome! If you find any problems or have suggestions for improvement, please create an issue or make a pull request.

⬆️ Back to Index

About

this is a backend project for a films app with posters. (Class project)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •