goappnew

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0

README

goappnew

Purpose

A go-app project structure to bootstrap new projects or experiments.

This is intended to be used with gonew and replaces goappcreate which did basically the same copy/substitute operations.

The following features are included:

  • A Makefile supporting all the build steps required to run a go-app 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 to allow installation as a service on supported platforms.
  • The gin web framework 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.
  • When running in dev mode, app updates are automatic.
  • Uses just a single folder goapp so it can be copied into an existing codebase.
  • Less than 400 lines of code - easy to understand and modify.

Usage

V9 go-app
  • gonew github.com/mlctrez/goappnew@v0.3.0 github.com/mlctrez/goappnewtest
  • cd goappnewtest
  • Run make with no arguments to start the server in dev mode.
V10 go-app
  • gonew github.com/mlctrez/goappnew@v1.0.1 github.com/mlctrez/goappnewtest
  • cd goappnewtest
  • Run make with no arguments to start the server in dev mode.

created by tigwen

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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