Navigation Menu

Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.


Folders and files

Last commit message
Last commit date

Latest commit



45 Commits

Repository files navigation

⚠️ Nodejs 8 is no longer supported by Firebase. To use Node 11 you have to add payment method. The concept described here should apply to Node 11 as well, minor modification may be required.


A simple mock API server using Express.js that is hosted on Firebase.

Why custom mock server

You have full control of what API to define and what data to respond with with minimal coding.

How it works

See medium article on how to setup firebase project and setup mock server.

Show me examples

The APIs are defined via Express.js framework and served though Firebase cloud functions. All the defined API can be found at 👉 functions/index.js 👈 and pre-loaded mock responses example can be found at mock-responses

Simple GET

Capture data from URL

POST data to register new account


curl -X POST \ \
  -H 'Content-Type: application/json' \
  -d '{"userId": "myusername", "email":"", "name": "New User"}'


curl -X POST \ \
  -H 'Content-Type: application/json' \
  -d '{"userId": "taken", "email":"", "name": "Existing User"}'

NOTE: You will have to use terminal to execute these curl commands.

Large list of photos response from mocked JSON file

Single photo item from mocked JSON file

Use 🔥 Firebase Firestore database

Using firebase console you can easily update the database values to reflect new values in realtime without needing to touch JSON source files.


No releases published


No packages published