bun-starter-kit

module
v0.0.0-...-00594a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2022 License: BSD-2-Clause

README

bun starter kit

build workflow

Bun starter kit consists of:

  • bunrouter is an extremely fast and flexible router.
  • bun
  • Hooks to initialize the app.
  • CLI to run HTTP server and migrations, for example, go run cmd/bun/*.go db help.
  • example package that shows how to load fixtures and test handlers.

You can also check bun-realworld-app which is a JSON API built with Bun starter kit.

Quickstart

To start using this kit, clone the repo:

git clone https://github.com/go-bun/bun-starter-kit.git

Make sure you have correct information in app/config/test.yaml and then run migrations (database must exist before running):

go run cmd/bun/main.go -env=dev db init
go run cmd/bun/main.go -env=dev db migrate

To start the server:

go run cmd/bun/main.go -env=dev runserver

Then run the tests in example package:

cd example
go test

See documentation for more info.

Directories

Path Synopsis
cmd
bun

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL