You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 years ago | |
|---|---|---|
| _frontend | 4 years ago | |
| database | 4 years ago | |
| routes | 4 years ago | |
| store | 4 years ago | |
| utils | 4 years ago | |
| .gitignore | 4 years ago | |
| README.md | 4 years ago | |
| config.go | 4 years ago | |
| go.mod | 4 years ago | |
| go.sum | 4 years ago | |
| main.go | 4 years ago | |
README.md
Go Vite Kit
Minimal boilerplate project for a Golang server using Fiber and ViteJS for static pages.
Features
Architecture
-
_frontend/This is a Vite project for building all the static pages used by this app.
-
database/Module with a
Databaseinterface and two implementation:memDBis an in-memory database for testing purposes whilesqliteDBis a wrapper for working with an SQLite database. -
routes/Various functions for configuring all the server routes.
Usage
First install the required npm packages
$ cd _frontend
_frontend/ $ npm install
Development
# Development
$ MODE=dev go run -v .
# Development with watcher
$ fd -e go | MODE=dev entr -r go run -v .
Production
First build the _frontend/dist folder using
$ cd _frontend
$ npm run build
and then
# Production
$ go run -v .