-
Clone this repository
-
Run
npm
oryarn
-
Create a service account JSON file from the Firebase console. By default save it as
/functions/service-account.json
. -
You need to have firebase-tools installed
npm i -g [email protected]
(8.4.2 has problems) -
Run
firebase init
and select Functions and Emulators. Install the Function emulator.
-
Launch locally using
firebase serve
-
Deploy using
firebase deploy
A "collection" is any object collection (e.g. Users, Projects, etc.). The term collection is taken from Firestore terminology.
GET /:collection
GET /:collection/:collectionId
By default, there is no schema defined or required. The object can contain any valid JSON.
POST /:collection
Content-Type: application/json
{
"name": "Something"
}
PUT /:collection/:collectionId
Content-Type: application/json
{
"archive": true
}
DELETE /:collection/:collectionId
Request
GET {{baseUrl}}/projects
Accept: application/json
Cache-Control: no-cache
Response
[
{
"id": "lpstt3v",
"category": "34 Fame",
"name": "Documentation Site",
"icon": "fas fa-book",
"status": "On-Hold"
}
]
Request
POST {{baseUrl}}/projects
Accept: application/json
Content-Type: application/json
Cache-Control: no-cache
{
"category": "34 Fame",
"name": "Documentation Site",
"icon": "fas fa-book",
"status": "On-Hold"
}
Response
{
"id": "lpstt3v",
"category": "34 Fame",
"name": "Documentation Site",
"icon": "fas fa-book",
"status": "On-Hold"
}
Request
PUT {{baseUrl}}/projects/lpstt3v
Accept: application/json
Content-Type: application/json
Cache-Control: no-cache
{
"status": "Open"
}
Response
{
"id": "lpstt3v",
"category": "34 Fame",
"name": "Documentation Site",
"icon": "fas fa-book",
"status": "Open"
}
DELETE {{baseUrl}}/projects/lpstt3v
Accept: */*
Cache-Control: no-cache