Skip to content

Dragan-Constantin/API-CleanCode

Repository files navigation

API Server Icon

Clean Code Course
API Project


GitHub all releases GitHub repo size Platforms

This project is an API built during the Clean Code course in B2 - Digital Engineering at EFREI Paris (Class of 2025)

The API is supposed to be linked to a database of movies, tv-shows, animes, and others.

For more information about the project, please refer to the specification.

Pre-requisite and dependencies

For this app to run, you will need to have Node.js installed. You can download it on the Node.js download page.

To run the app, you might have to install through node the following JavaScript modules:

To install these, you can simply run this command in the terminal of your choosing (ctrl+j in VS:Code):

npm i express mongoose cors dotenv

If it still doesn't work, you might have to install the MongoDB JavaScript module too.

To install it, you can simply run the following command in the terminal of your choosing:

npm i mongodb

Run the API

To run this api app, open the terminal of your choosing and run the following node command:

node app.js

To quickly test if it did launch properly, open your web-browser and go to http://localhost:3000/movies.

If a dictionnary is displayed on your screen, congrats! The API launched correctly!

For this project, the database used is a MongoDB Atlas database.


⚠️ IMPORTANT : In the .env file, you WILL have to replace <user>, <password> and <database> with your own login credentials to your database.


The file addData.js allows you to add a test movie collection (Star Wars based in this case).

If you want to test the POST, GET, etc. I suggest using the Thunder Client VS:Code extension, or other solutions of your choosing (Postman, etc.)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published