A starter app written in Typescript for NestJS -- built using Bazel
This project was created by invoking the default Nest app scaffold via the Nest CLI, and then the addition of simple BUILD.bazel
and WORKSPACE
files, making use of rules_nodejs.
To create this from scratch in a new project, run the following:
nest new AppName
yarn create @bazel APP_NAME --packageManager=yarn --typescript
and now add the files WORKSPACE
and src/BUILD.bazel
to your new directory root and src
folders, respectively.
With Bazel installed:
bazel run //src:server
Without Bazel installed:
yarn install -D
yarn bazel:run
Build Docker image:
bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:docker
Push image to the registry (currently set to gcr.io
):
bazel run --define push_tag=${IMAGE_TAG} --define push_repository=${REPOSITORY} //src:push_container