Added node close on shutdown
This commit is contained in:
parent
2de358c843
commit
94b3fd997e
9
main.go
9
main.go
@ -207,9 +207,6 @@ func configure(app *aero.Application) *aero.Application {
|
||||
middleware.UserInfo(),
|
||||
)
|
||||
|
||||
// Database
|
||||
arn.DB.PrefetchData()
|
||||
|
||||
// API
|
||||
arn.API.Install(app)
|
||||
|
||||
@ -221,6 +218,12 @@ func configure(app *aero.Application) *aero.Application {
|
||||
// Authentication
|
||||
auth.Install(app)
|
||||
|
||||
// Close the database node on shutdown
|
||||
app.OnShutdown(arn.Node.Close)
|
||||
|
||||
// Prefetch data from all collections
|
||||
arn.DB.PrefetchData()
|
||||
|
||||
// Specify test routes
|
||||
for route, examples := range routeTests {
|
||||
app.Test(route, examples)
|
||||
|
Loading…
Reference in New Issue
Block a user