mlctrez / goappnew

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 300 lines of code - easy to understand and modify.

Usage

  • gonew github.com/mlctrez/goappnew@v0.2.5 github.com/mlctrez/goappnewtest
  • cd goappnewtest
  • Run make with no arguments to start the server in dev mode.

created by tigwen

About

License:Apache License 2.0


Languages

Language:Go 91.3%Language:Makefile 8.0%Language:CSS 0.7%