'on collection create' event

Hi @jascodes

If you need to seed your database you have many options like:

serverStartComplete option on ParseServer instance.

If you use schemas new feature you can also provided a afterMigration, beforeMigration

A special note on these functions, if you use ParseServer.start, internally Parse do not currently wait startup complete before running app.listen(). This issue is already know and we need to adjust some details to avoid this use case. On my parse server i define a custom route on the express app to tell to my orchestrator (Kubernetes) when the app is ready to accept traffic once everything is initialized.

i add this line at the end of the serverStartComplete fn

// const parseServer = ParseServer.start({
serverStartComplete: async () => {
  parseServer.expressApp.get('/ready', (req: any, res: any) => {
    res.send('true')
  })
}
1 Like