1
0
Fork 0

chore: updated readme

main
Antonio De Lucreziis 2 years ago
parent ba43faa527
commit 98038e1451

@ -1,39 +1,16 @@
# Go Vite Kit # Cluster Dashboard
Minimal boilerplate project for a Golang server using [Fiber](https://github.com/gofiber/fiber) and [ViteJS](https://github.com/vitejs/vite) for static pages Una dashboard web moderna per il cluster "steffe" per il progetto di calcolo parallelo del prof. Durastante.
## Features ## Features
- ⚡️ [Go Fiber](https://github.com/gofiber/fiber) - ⚡️ [Go Fiber](https://github.com/gofiber/fiber)
- 📦 [ViteJS](http://vitejs.dev/) - 📦 [ViteJS](http://vitejs.dev/)
- 🎨 [Sass](https://sass-lang.com/) - 🎨 [Sass](https://sass-lang.com/)
- 🗄️ [Sqlite3](https://github.com/mattn/go-sqlite3)
## Architecture ## Architecture
- `frontend/` Questo progetto è stato generato dal template, alcune informazioni sull'architettura di questo progetto si trovano su <https://github.com/aziis98/go-vite-kit>
This is a Vite project for building all the static pages used by this app.
- `backend/`
This keeps all server related files
- `config/`
Loads env variables and keeps them as globals
- `database/`
Module with a `Database` interface and two implementation: `memDB` is an in-memory database for testing purposes. `sqliteDB` is a wrapper for working with an SQLite database.
- `routes/`
Various functions for configuring all the server routes.
A very important file is `backend/routes/router.go` that contains the `HtmlEntrypoints` variable that is used both by the backend and ViteJS to mount HTML entrypoints.
When building the frontend ViteJS will call `go run ./meta/routes` to read the content of the `HtmlEntrypoints` variable. This is also used while developing to let Vite know add all necessary entrypoints to the dev server.
## Usage ## Usage
@ -61,8 +38,8 @@ $ fd -e go | MODE=dev entr -r go run -v ./cmd/server
You can build everything with the following command, it will build first the frontend and then the backend and generate `./out/server`. You can build everything with the following command, it will build first the frontend and then the backend and generate `./out/server`.
```bash ```bash
# Build $ npm run build
$ go run -v ./cmd/build $ go build -o ./out/server ./cmd/server
# Run # Run
$ ./out/server $ ./out/server

Loading…
Cancel
Save