A web app for sharing photos and interacting with friends.
cmd/
contains all executables; Go programs here should only do "executable-stuff", like reading options from the CLI/env, etc.cmd/healthcheck
is an example of a daemon for checking the health of servers daemons; useful when the hypervisor is not providing HTTP readiness/liveness probes (e.g., Docker engine)cmd/webapi
contains an example of a web API server daemon
demo/
contains a demo config filedoc/
contains the documentation (usually, for APIs, this means an OpenAPI file)service/
has all packages for implementing project-specific functionalitiesservice/api
contains an example of an API serverservice/globaltime
contains a wrapper package fortime.Time
(useful in unit testing)
vendor/
is managed by Go, and contains a copy of all dependencieswebui/
is an example of a web frontend in Vue.js; it includes:- Bootstrap JavaScript framework
- a customized version of "Bootstrap dashboard" template
- feather icons as SVG
- Go code for release embedding
Other project files include:
open-npm.sh
starts a new (temporary) container usingnode:lts
image for safe web frontend development (you don't want to usenpm
in your system, do you?)
This project uses Go Vendoring. You must use go mod vendor
after changing some dependency (go get
or go mod tidy
) and add all files under vendor/
directory in your commit.
For more information about vendoring:
This repository contains the webui/node_modules
directory with all dependencies for Vue.JS. You should commit the content of that directory and both package.json
and package-lock.json
.
If you're not using the WebUI, or if you don't want to embed the WebUI into the final executable, then:
go build ./cmd/webapi/
If you're using the WebUI and you want to embed it into the final executable:
./open-npm.sh
# (here you're inside the NPM container)
npm run build-embed
exit
# (outside the NPM container)
go build -tags webui ./cmd/webapi/
You can launch the backend only using:
go run ./cmd/webapi/
If you want to launch the WebUI, open a new tab and launch:
./open-npm.sh
# (here you're inside the NPM container)
npm run dev
See LICENSE.