command
module
Version:
v1.2.2
Opens a new window with list of versions in this module.
Published: Aug 1, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
goappcreate
⚠ Use goappnew instead.
Purpose
Creates a minimal go-app 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 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.
- The
app.Handler
configuration is loaded from a json file in the web directory.
- When running in dev mode, 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 <modulePath>
- 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.
created by tigwen
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.