You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# ILPlatform Backend
1
+
# ILPlatform Backend
2
2
3
3
This repo constitutes the backend for the ILPlatform landing and curriculum page. It is built using Firebase Functions
4
4
and connects to the Salesforce and Google API for database and document management.
@@ -7,8 +7,9 @@ and connects to the Salesforce and Google API for database and document manageme
7
7
8
8
In order for the code to make sense, you need to generate the following files:
9
9
10
-
-`functions/.googleapi_credentials.json` - Can be obtained through the Google Cloud Console under Credentials > OAuth
11
-
2.0 Client IDs with type Web Application and redirect URI "http://localhost:8888/oauth2callback".
10
+
-`functions/.googleapi_credentials.json` - Can be obtained through the Google Cloud Console (Project: ILPlatform
11
+
Website) under Credentials (search for it) > OAuth 2.0 Client IDs with type Web Application and redirect
12
+
URI "http://localhost:8888/oauth2callback". Simply select pre-existing client and generate new client secret.
12
13
-`functions/.googleapi_token.json` - Can be obtained by running the server locally (see below) and calling any endpoint
13
14
that requires the Google Connector. Ensure that all required scopes are activated in the Google API.
14
15
-`functions/.firebase_adminsdk.json` - Can be obtained through the Firebase Console under Project Settings > Service
@@ -35,16 +36,33 @@ In order for the code to make sense, you need to generate the following files:
35
36
-`functions/venv` - Contains the Python virtual environment for the backend. Can be created by running
36
37
```bash
37
38
cd functions
38
-
python3.11 -m venv venv
39
+
python3.12 -m venv venv
39
40
source venv/bin/activate
40
-
python3.11 -m pip install -r requirements.txt
41
+
python3.12 -m pip install -r requirements.txt
41
42
```
43
+
Alternatively, run `source sh_create_env.sh`.
42
44
43
45
## Local Development
44
46
45
47
In order to run the code, you need to run the following;
46
48
47
49
```
48
-
. functions/venv/bin/activate
50
+
source functions/venv/bin/activate
49
51
firebase emulators:start --only functions
52
+
```
53
+
Alternatively, run `source sh_start.sh`.
54
+
55
+
## Possible Issues
56
+
57
+
### User code failed to load
58
+
59
+
An error of this style might occur:
60
+
```
61
+
⬢ functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification. Timeout after 10000. See https://firebase.google.com/docs/functions/tips#avoid_deployment_timeouts_during_initialization'
0 commit comments