Wisely building web applications.
With athena you can easily run net/http applications that will gracefully be stopped once receive a INTERRUPT signal (Ctrl+C). For example:
athena.GracefulHTTP(&http.Server{
Addr: ":3000", // bind address
Handler: app.Handler(), // your http handler
}, serviceStarter) // from github.com/lab259/go-rscsrvIf you prefer fasthttp:
athena.GracefulFastHTTP(
app.NewServer(), // your fasthttp server
":3000", // bind address
serviceStarter, // from github.com/lab259/go-rscsrv
)athena ships with a CLI to generate models (for PostgreSQL and MongoDB) and services. Execute athena --help for more information:
Usage: athena [OPTIONS] COMMAND [arg...]
Wisely building web applications
Options:
-v, --version Show the version and exit
Commands:
make:service Generate a service
make:model Generate a model
make:mgomodel Generate a mgo model
A configuration loader implementation from YAML files.
Parse pagination values (current page and page size) with sane defaults.
Built-in go-rscsrv's Service implementation for common services:
Utilities for testing applications:
envtest: overwrite environment variablesginkgtest: initialize ginkgo with macchiato + reporters for CIhttptest: wrappers for net/http, fasthttp, hermes usinghttpexpectmgotest: helpers for cleansing the databasepsqltest: overwrite the default PostgreSQL service implemenation to use transationsrscsrvtest: initilize serveral services (with before and after hooks)
Validate structs and values using the go-playground/validator.v9.
What things you need to setup the project:
Close the repository:
git clone git@github.com:lab259/athena.gitNow, the dependencies must be installed.
cd athena && go mod download
😉 Finally, you are done to start developing.
In the root directory, execute:
make testTo enable coverage, execute:
make coverageTo generate the HTML coverage report, execute:
make coverage coverage-html