Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kferrone/kellyferrone.serverless
Serverless cloud functions for me! https://github.com/kferrone/kellyferrone.com
https://github.com/kferrone/kellyferrone.serverless
Last synced: 26 days ago
JSON representation
Serverless cloud functions for me! https://github.com/kferrone/kellyferrone.com
- Host: GitHub
- URL: https://github.com/kferrone/kellyferrone.serverless
- Owner: kferrone
- Created: 2019-03-12T21:58:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T11:53:04.000Z (about 2 years ago)
- Last Synced: 2024-03-17T23:50:45.164Z (10 months ago)
- Language: JavaScript
- Homepage: https://kellyferrone.com
- Size: 831 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Cloud Functions
These are used as the back end stuff for the frontend blogger site.
Here are the three needed functions:
* [email](functions/email/README.md)# Google Cloud Functions - SendGrid sample
See:
* [Cloud Functions SendGrid tutorial][tutorial]
* [Cloud Functions SendGrid sample source code][code][tutorial]: https://cloud.google.com/functions/docs/tutorials/sendgrid
[code]: index.js## Dependencies
- NodeJS8## Deploy and run the sample
See the [Cloud Functions SendGrid tutorial][tutorial].
## Run the tests
1. Read and follow the [prerequisites](../../#how-to-run-the-tests).
**notes:**
* On Windows run this: `npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"`
1. Install dependencies:
npm install
1. Run the tests:
npm test
## Config
Create a file called `config.json` with the following:
```json
{
"host": "",
"blogger": {
"key": "",
"blogID": ""
},
"sendGrid": {
"key": "",
"email": ""
},
"gCloud": {
"project": "",
"region": "",
"eventBucket":"",
"dataset": ""
},
"webhooks": {
"username": "",
"password": ""
}
}
```then run the command below to save
```sh
firebase functions:config:set app="$(cat config.json)"
```now run this to see the config
```sh
firebase functions:config:get app
```## Deployment
To deploy the functions manually simply run:
```sh
firebase deploy
```To deploy the automated CI way, you must first update the version of the project with node:
```sh
npm version patch
```