Skip to content

mlctrez/goappnew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.
  • Support for tinygo when building the wasm - uncomment USE_TINY_GO=1 in Makefile
    • Currently, go v1.24.1 and tinygo 0.37.0 must be used
    • Supported only with V10 of go-app

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.6 github.com/mlctrez/goappnewtest
  • cd goappnewtest
  • Run make with no arguments to start the server in dev mode.

created by tigwen

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors