If Bun is already installed, you can run bun upgrade
to update to the latest version of Bun.
- Install deps:
cd ../..
bun i
- Configure .env files in both root of the project and in the root of the API package:
touch .env
vim|nano|code .env
cp ./.env ./packages/api/.env
Values can be obtained from Google Cloud Secret Manager.
- ... and that should be it!
To run the project in development mode, run the following in your terminal:
bun dev
Alternatively, you can run the project in production by running:
bun start
This will transpile TS to JS and start the transpiled application. However, you will need to have created a symbolic link in the root directory to public assets:
# IN ROOT DIRECTORY!
ln -s ./packages/api/public ./public
Docker is an alternative way of running the application, which is necessary on Linux distributions. To run the application in dev mode using Docker:
bun build:docker-dev
bun dev:docker
Similarly, the production build can be run using the following:
bun build:docker
bun start:docker