This is the heart of the project. It is the component that is an intermediary between the database and the web and mobile client.
- A Firebase Project with firestore db and cloud functions enabled you can set up one here.
- Navigate to the
functions
folder. - Run
npm install
to install the required packages. - Insert your
serviceAccount.json
from firebase inside the functions folder. - Add a
.env
file then addDB_URL
followed with your firestore url. - 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
/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.