Basic NestJs REST API to perform CURD operations from firestore. Initial mock data is retrieved from https://jsonplaceholder.typicode.com/
- Clone the repository
- Generate serviceAccountKey.json from firebase console
- Add it in root directory as
serviceAccountKey.json
yarn install
(first time)yarn start:dev
All possible HTTP request sample are present within http
directory. Some of the sample ones are listed below
- http://localhost:3000/users/init - Add all mock data to firestore
- http://localhost:3000/users - retrieves all users from firestore
- http://localhost:3000/posts/init - Add all posts mock data to firestore
- http://localhost:3000/posts - retrieves all posts from firestore
- Go to firebase console and navigate to specific project
- Click on
Settings
->Project Settings
- Click on
Service accounts
- Select
NodeJs
underAdmin SDK configuration snippet
- Click on
Generate New Provate Key
- Click on
Generate Key
- Save the file as
serviceAccountKey.json
under projects root directory
- Improve code coverage