This repository is the backend for a mobile application that aims to provide various features such as authentication, chat, and more. This backend is built using TypeScript, Firebase, Zod, JWT, OpenAPI (Swagger), FireStore, and Cloud Storage
Clone the project
git clone https://github.com/Project404-PasalPintar/pasalpintar-backend
- Fix
eslint
- Go to the project directory
cd pasalpintar-backend/functions
npm run lint -- --fix
- Create an .env file based on the env.example file
copy .env.example .env
NOTE: if you use Cloud Functions V1
- Add Firebase Env
Optional
firebase functions:config:set JWT_ACCESS_TOKEN_SECRET="YOUR_ACCESS_TOKEN_SECRET" firebase functions:config:set JWT_REFRESH_TOKEN_SECRET="YOUR_REFRESH_TOKEN_SECRET"
- Check Firebase Env
Optional
firebase functions:config:get
- Remove Env API.KEY Firebase
Optional
firebase functions:config:unset api.key
- Deploy Cloud Functions
- Go to the project directory
cd pasalpintar-backend
- Deploy Cloud All Functions
firebase deploy --only functions
Deploy Cloud Functions Depend On The Name
Optional
firebase deploy --only functions:auth,functions:session