Skip to content
A simple mock API server using expressjs that is hosted on firebase.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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.

You can’t perform that action at this time.