Your project has a full CLI interface, run
admini help to see available options.
When the main HTTP server starts, the code in
app/controller/init.go is run.
initApp, for system startup logic, and
initAppRequest, which is run before each HTTP request.
The main dependencies of the project are in
app/state.go, which defines a
State object that should almost always be in scope.
It contains a
Services instance which is where we’ll add all our project-specific dependencies.
You can find it in
- All controller actions live in
app/controller. Normal HTTP actions should use the
controller.Acthelper method, which extracts a session and injects dependencies.
- Your method is provided an
cutil.PageStatewhich contains user and session information, and includes
Datafields, used for HTML title and data repsonses.
- Every action supports content negotiation, you can pass a
Content-Typeheader, or add [
?t=xml], to any URL.