Firebase Functions Express Example Save Abandoned

Express server running on Cloud Functions for Firebase

Project README

THIS REPO HAS BEEN MOVED

This example has been merged into my blog-examples repo. This repo will no longer be updated.


Express Server on Cloud Functions for Firebase

Host an Express Server in Cloud Functions for Firebase.

Here is the accompanying Medium Post.

TLDR;

Host your Express Server on Cloud Functions enabling a low-cost, auto-scaling web server leveraging Firebase's sweet developer experience.

Cloud Functions uses Express request and response objects allowing us to pass an Express app directly into the function.

File of interest:

Installation

git clone https://github.com/jthegedus/firebase-functions-express-example
cd firebase-functions-express-example
yarn install

Local Development

yarn serve

This will serve the Cloud Functions locally using the Firebase emulator. Interestingly, the trailing / is not an issue when hosted locally.

Deploy to Firebase

yarn deploy

N.B.: Replace <project-name> in the .firebaserc to connect the project to your Firebase project.

A note on Code Compatibility

Everything was tested on Ubuntu 16.04 & Windows 10 with Bash on Ubuntu on Windows. If you wish for Windows native support please submit an issue so we can work on a Windows branch. Please report any macOS errors as I do not have access to a device to test. My development environment can be found here.

Open Source Agenda is not affiliated with "Firebase Functions Express Example" Project. README Source: jthegedus/firebase-functions-express-example
Stars
28
Open Issues
0
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating