- NodeJS v20.10.0
- ExpressJS
- Prisma ORM
- MySQL
- Google Cloud Run
- Service account key with Cloud Storage access
- gcloud CLI
- Git clone this repo
- Set up your service account.
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"- Run your MySQL database on local
- Run
npm installon your terminal - Make .env file, declare your
DATABASE_URL:
Refer Prisma Docs for
DATABASE_URLformat.
DATABASE_URL="mysql://<user>:<password>@127.0.0.1:3306/capstone"Instead .env file, you also can declare it via your shell session.
- Run
npx prisma generateto generate Prisma model. - Run
npm run dev
- Of course git clone this repo
- Create a new secret for the
DATABASE_URLat Google Cloud Console - Run this command:
gcloud run deploy \
--allow-unauthenticated \
--set-env-vars DATABASE_URL=@DATABASE_URL