Skip to content

Xcelerators-Bangkit/xcelerators-backend

Repository files navigation

xcelerators-backend

Tools and resource used

  • NodeJS v20.10.0
  • ExpressJS
  • Prisma ORM
  • MySQL
  • Google Cloud Run
  • Service account key with Cloud Storage access
  • gcloud CLI

Local development setup

  1. Git clone this repo
  2. Set up your service account.
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
  1. Run your MySQL database on local
  2. Run npm install on your terminal
  3. Make .env file, declare your DATABASE_URL:

Refer Prisma Docs for DATABASE_URL format.

DATABASE_URL="mysql://<user>:<password>@127.0.0.1:3306/capstone"

Instead .env file, you also can declare it via your shell session.

  1. Run npx prisma generate to generate Prisma model.
  2. Run npm run dev

Deployment

  1. Of course git clone this repo
  2. Create a new secret for the DATABASE_URL at Google Cloud Console
  3. Run this command:
gcloud run deploy \
    --allow-unauthenticated \
    --set-env-vars DATABASE_URL=@DATABASE_URL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors