Skip to content

Latest commit

 

History

History

express-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Express Server

This is the heart of the project. It is the component that is an intermediary between the database and the web and mobile client.

Prerequisites

  • A Firebase Project with firestore db and cloud functions enabled you can set up one here.

Setup

  1. Navigate to the functions folder.
  2. Run npm install to install the required packages.
  3. Insert your serviceAccount.json from firebase inside the functions folder.
  4. Add a .env file then add DB_URL followed with your firestore url.
  5. Run npm run deploy in the terminal to deploy your project to firebase. If you are not sure on the steps use this guide

NOTE: After deploying you will get a url which looks something like https://FIREBASE_APP_NAME.cloudfunctions.net/app/ this is going to be the primary api url for the web and mobile client

Api Endpoints

  • /movies which deals with the movies in the download queue it has the following methods: GET, POST & DELETE.
  • /requests which deals with movies that are in the queue but have not yet been sent to the download server it has the following methods: GET, POST & DELETE.