Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siberex/bazel-nestjs-starter
Example of Bazel build config for NestJS app
https://github.com/siberex/bazel-nestjs-starter
bazel build docker js nest nestjs nodejs rules-nodejs ts typescript
Last synced: 7 days ago
JSON representation
Example of Bazel build config for NestJS app
- Host: GitHub
- URL: https://github.com/siberex/bazel-nestjs-starter
- Owner: siberex
- Created: 2019-06-10T14:40:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T06:15:18.000Z (almost 2 years ago)
- Last Synced: 2024-07-31T07:18:42.503Z (3 months ago)
- Topics: bazel, build, docker, js, nest, nestjs, nodejs, rules-nodejs, ts, typescript
- Language: Python
- Size: 1.79 MB
- Stars: 20
- Watchers: 2
- Forks: 3
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - bazel-nestjs-starter - Example of Bazel build config for NestJS app (Python)
README
![Bazel at Scalio](https://raw.githubusercontent.com/scalio/bazel/master/assets/scalio-bn.svg?sanitize=true)
Bazel Nest Starter
A starter app written in Typescript for NestJS -- built using Bazel
## OverviewThis 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](https://github.com/bazelbuild/rules_nodejs/#quickstart).
To create this from scratch in a new project, run the following:
```bash
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.
## Build and run
With Bazel installed:
```bash
bazel run //src:server
```Without Bazel installed:
```bash
yarn install -D
yarn bazel:run
```## Docker
Build Docker image:
```bash
bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:docker
```Push image to the registry (currently set to `gcr.io`):
```bash
bazel run --define push_tag=${IMAGE_TAG} --define push_repository=${REPOSITORY} //src:push_container
```## Credits
Created by [@siberex](https://github.com/siberex/) @ [Scalio](https://scal.io/)
## About us