Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.06 KB

init.go-file.md

File metadata and controls

28 lines (22 loc) · 1.06 KB

Title: aah init.go file Desc: init.go - aah application customization and initialization file. Keywords: init.go, application customization, application initialization, aah

aah init.go file

Introduced in v0.10.0. aah brought init.go file to evolve towards the next step.

Best Practice: Define extensions and custom implementations in an appropriate package and register it in init.go. It brings a more flexible, organized and maintainable aah application. It is located at <app-base-dir>/app/init.go.

Register -

  • Server Extensions Points
    • Application Events
    • Subscribe to HTTP Events
    • Subscribe to WebSocket Events
  • Middleware's
  • Application Error Handler
  • Custom Template Functions
  • Custom Session Store
  • Custom Value Parser - Auto bind request values
  • Custom Validation Functions
  • etc.

Create an application and have a look at the file <app-base-dir>/app/init.go to view a sample.