Simple access VPN Gate API with heroku/zeit-now/netlfiy and save to firebase firestore.
- NodeJS >= 8.0.0
- YARN (latest)
- Create new project firebase app
- Creeate new app from this providers (you can choose one):
- Generate new private key then open it and copy all text for make encode value to base64 or you can use this link.
- Add environment variables
FIREBASEwith with the value that you have encoded.
yarnCopy or rename .env.example to .env.
cp .env.example .envPut your encode base64 text in FIREBASE ENV.
FIREBASE=YOUR_FIREBASE_HAS_ENCODED_WITH_BASE64Run test with command:
yarn devAccess with this url localhost:5000
BASE URL:
- Heroku:
https://[YOUR-HEROKU-APP-NAME].herokuapp.com - Zeit Now:
https://[YOUR-ZEIT-NOW-APP-NAME].now.sh - Netlify:
https://[YOUR-NETLIFY-APP-NAME].netlify.com/.netlify/functions
| method | path | query | body | details |
|---|---|---|---|---|
GET |
/ |
- | - | count servers and configs. |
POST |
/ |
- | - | insert or update servers and configs. |
DELETE |
/ |
- | - | delete servers and configs. |
PATCH |
/ |
- | - | use delete and insert at once. |
GET |
/insert |
- | - | insert or update servers and configs. |
GET |
/delete |
- | - | delete servers and configs. |
GET |
/update |
- | - | use delete and insert at once. |
GET |
/send-notification |
title & body |
- | send notification to all users. |
POST |
/send-notification |
- | title & body |
send notification to all users. |