Skip to content

[Adonis 5] How to query database on app start and keep the values? #3223

Answered by arthur-er
guntribam asked this question in Help
Discussion options

You must be logged in to vote

Use a preload file.

$ node ace make:prldfile loadActions
// start/loadActions.ts
// query the db here, and update the needed values.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@guntribam
Comment options

Answer selected by guntribam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants