git clone -b dev https://github.com/Bangkit-Capstone-2024/Capstone-CC.git
cp .env.example .env
npm install
npm install -g nodemon
npm install -g pm2
npx prisma migrate deploy
npm run dev
npm install
npm run build
npm run start:pm2
Usefull Command
pm2 status
pm2 stop dev-momee
pm2 restart dev-momee
pm2 delete dev-momee
pm2 save
pm2 startup
Should be changed at .env
- Create new Project
- Enable Cloud Storage API:
Navigation Menu > API & Services > Library > Google Cloud Storage > Enable
- Create New Bucket:
Navigation Menu > Storage > Browser > Create Bucket > (Name Bucket) > Create
- Give Public Access for Bucket
Bucket Name > PERMISSIONS > + GRANT ACCESS > New Principals : allUsers > Roles: Storage Object Viewer
- Create Service Account
a. Open Navigation Menu > IAM & Admin > Service Account
b. Click Create Service Account
c. Give name and click Create
d. At 'Role', Choose Storage > Storage Admin
e. Click Done
f. Click 'Manage keys'
g. Click Add Key > Create new key
h. Choose 'JSON' and 'Create'
i. Download JSON File and Save
j. create and save JSON file to new Folder : `mkdir credentials`
- Edit .env
GOOGLE_APPLICATION_CREDENTIALS=./credentials/<service-account.json>
GCS_BUCKET_NAME=<BUCKET-NAME>
GOOGLE_MAPS_API_KEY=<your-MAPS-API-KEY>