https://github.com/mlctrez/goappcreate
https://github.com/mlctrez/goappcreate
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mlctrez/goappcreate
- Owner: mlctrez
- License: apache-2.0
- Created: 2022-11-15T20:59:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-01T21:41:44.000Z (almost 3 years ago)
- Last Synced: 2025-10-10T03:56:34.155Z (9 months ago)
- Language: Go
- Size: 222 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goappcreate
> :warning: Use [goappnew](https://github.com/mlctrez/goappnew) instead.
## Purpose
Creates a minimal [go-app](https://go-app.dev/) project structure to bootstrap new projects or experiments.
The following features are included:
* A Makefile supporting all the build steps required to run a [go-app](https://go-app.dev/) project.
* An application version backed by the current tag and commit hash from git.
* A proper split between the wasm and server dependencies to reduce the final wasm size.
* Web resources, including the `app.wasm` are embedded in the server binary during the build.
* The server binary uses [servicego](github.com/mlctrez/servicego) to allow installation as a service on
supported platforms.
* The [gin web framework](https://github.com/gin-gonic/gin) is included and brotli compression middleware
is pre-configured.
* It supports the wasm file size header to correctly display progress on the loading screen when using compression.
* The `app.Handler` configuration is loaded from a json file in the web directory.
* When running in dev mode, [app updates](https://go-app.dev/lifecycle#listen-for-app-updates) are automatic.
* Uses just a single folder `goapp` so it can fit into an existing codebase.
* Checks are performed to prevent overwriting any existing files.
* Less than 300 lines of code - easy to understand and modify.
## Usage
* Create a go project with modules - `go mod init `
* Initialize a git repository to pul the tag and hash information from.
* This is not required for development, but is highly recommended for other environments.
* Install using `go install github.com/mlctrez/goappcreate@v1.2.1`
* Execute `goappcreate` in the project folder.
* There is only one option, `-dark`, to substitute in a dark theme for the loading screen.
* Install dependencies using `go mod tidy`
* Run `make` with no arguments to start the server in dev mode.
[](https://goreportcard.com/report/github.com/mlctrez/goappcreate)
created by [tigwen](https://github.com/mlctrez/tigwen)