-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up the backend for localhost
Leo Heng edited this page May 1, 2024
·
1 revision
All backend related information exists purely within the functions folder. Treat this folder more like a seperate repository rather than a normal folder. This means when a guide says run npm install or you need to install npm modules for the backend you must run the command within the functions folder.
- Navigate into functions folder
- Create a new .env file
- Ask for the website director for API keys for the backend
- NOTE: By this point you should have two .env files one in the root directory and one in /functions. Make sure you place them in the correct location
- NOTE: It should be set by default but DO NOT push your .env files to the repository
- Navigate into functions folder
- Run
npm install
This stage is required as our backend is just serverless functions from Firebase
- Run
npm install -g firebase-tools(this can be run anywhere)
- Run
npm run serve(in root directory or in functions)