Sample bun template with Turso DB, eslint, prettier, docker, husky, sonarjs, testing with coverage, and more.
- β Turso
- β Kysely
- β Eslint
- β eslint-sonarjs
- β eslint-plugin-security
- β Prettier
- β Husky
- β Esdoc
- β CodeQL
- β Joi
- β Sentry
- β Jsconfig with checkjs and strict
- β Docker ready
- β Bun ready
- β Bun testing with coverage
- β Path aliases
- β Types
- Bun (^1.1.13)
- Docker (optional)
To install BUN, do the following:
curl -fsSL https://bun.sh/install | bash
Now we are going to do a bun create with this template.
Just in case, here are additiona flags for the bun create command:
--force Overwrite existing files
--no-install Skip installing node_modules & tasks
--no-git Donβt initialize a git repository
--open Start & open in-browser after finish
mkdir your_app
bun create github.com/jd-apprentice/jd-bun your_app
cd your_app
cp .env.example .env
Make sure to complete the .env
file with the following information:
Variable | Description |
---|---|
TURSO_URL | Turso url |
TURSO_DB_TOKEN | Turso db token |
Change the default names with the following script:
bun run replace
$ bash ./scripts/app_name.sh
Enter the new name: sample
Replacement completed. π
This will replace all app_name
with sample
in the project.
make
This will build the app with bunjs and execute the binary.
Bun still needs to be installed to build the binary.
- Prepare the binary
bun install
bun test (optional)
bun run build
- Build the image manually
Remember to replace app_name
with the name of your app.
docker build -f docker/base-x86_64.Dockerfile -t app_bin .
docker build -f docker/app.Dockerfile -t app_name .
docker compose up -d
- For more information, check the CONTRIBUTE file
Thanks goes to these wonderful people (emoji key):
Jonathan Dyallo π» |