This project demonstrates the implementation of #CRUD operation with #Firebase under NodeJs app
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node JS
- Postman (For testing api locally)
- Firebase project setup
-
If you haven't already, create a Firebase project: In the Firebase console, click Add project, then follow the on-screen instructions to create a Firebase project or to add Firebase services to an existing GCP project.
-
Navigate to the Database section of the Firebase console. You'll be prompted to select an existing Firebase project. Follow the database creation workflow.
-
Select a starting mode for your Firebase Security Rules
-
Click Done.
-
In the Firebase console, open Settings > Service Accounts.
-
Click Generate New Private Key, then confirm by clicking Generate Key.
-
Securely store the JSON file containing the key.
NOTE:
- In my project the service account file is
server/service-account-file.json
- Firebase configurations are under
server/services/Firebase.js
Method: POST
URL: http://localhost:3000/api/auth/createAccount
Body:
{
firstName: String,
lastName: String,
email: String,
password: String,
}
Method: POST
URL: http://localhost:3000/api/auth/login
Body:
{
email: String,
password: String,
}
Method: PUT
URL: http://localhost:3000/api/auth/update/{id}
Body:
{
firstName: String,
lastName: String,
email: String(optiona),
password: String,
}
Method: DELETE
URL: http://localhost:3000/api/auth/remove/{id}
This project is licensed under the MIT License - see the LICENSE file for details