Roll your own json-server with Google Firebase
- Install nodejs with npm (or yarn)
- Install firebase-tools CLI
npm install -g firebase-tools
oryarn global add firebase-tools
- Clone & cd into this repo
- Login to firebase with CLI
firebase login
- Create firebase project
firebase projects:create
, or use existing projectfirebase use
cd functions && yarn install
- Change
functions/db.json
to suit your needs - Start local json-server with
firebase serve --only=hosting,functions
- Deploy json-server to firebase cloud hosting with
firebase deploy
- Access to url
http://localhost:5000/api/
orhttps://yourprojectname.firebaseapp.com/api/