This is an example project to demonstrate serverless coding with Firebase. Demo: https://fello.backender.io/
I'll upload slides with notes a bit later.
This repository has been split into different feature branches.
- master: Starting point for Firebase Hosting
- step_two: Authentication
- step_three: Realtime Database
- step_four: Firebase Storage
- step_five: Simple relations in Realtime Database
- step_six: Cloud Messaging
You can checkout any of the branches at any time and just read the STEP_INFO.md for information regarding that step (deployment info, changes, etc).
Even though this example is Serverless, you need Node.JS installed for development.
I built this demo to showcase on different Firebase features in different meetups, etc.
NOTE! Pay no attention to the UI code ;) I could have used a UI Framework like (Angular, React, etc), but desided to just hack something together quickly so it doesn't hide the base logic of the functionality I wanted to show.
-
- Clone the repo
- 1.1. Switch to the branch you want to test out (read the STEP_INFO.md)
-
- Install dependencies
npm install && bower install
-
- Insert your Firebase Database credentials here (in this README):
FIREBASE_PROJECT_ID: MY-PROJECT-ID
FIREBASE_API_KEY: MY-API-KEY
Or you can also export them as environment variables
export FIREBASE_PROJECT_ID=MY-PROJECT-ID
export FIREBASE_API_KEY=MY-API-KEY
-
- Run the dev server with livereload
npm run dev
Requirements:
- Firebase CLI tool (npm install -g firebase-tools)
To deploy this under your own Firebase project, create .firebaserc -file in the project directory with following content:
{
"projects": {
"default": "YOUR_PROJECT_ID"
}
}
Then build the assets and deploy to hosting:
npm run deploy
License: MIT