Created
June 14, 2022 18:42
-
-
Save malikdoksoz/44a730257ddb1b8e9bef08844123b30c to your computer and use it in GitHub Desktop.
adonisjs 5 websocket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApplicationContract } from '@ioc:Adonis/Core/Application' | |
export default class AppProvider { | |
constructor(protected app: ApplicationContract) {} | |
public register() { | |
// Register your own bindings | |
} | |
public async boot() { | |
// IoC container is ready | |
} | |
public async ready() { | |
// App is ready | |
if (this.app.environment === 'web') { | |
await import('../start/socket') | |
} | |
} | |
public async shutdown() { | |
// Cleanup, since app is going down | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment