29 lines
714 B
TypeScript
29 lines
714 B
TypeScript
import type { ApplicationContract } from "@ioc:Adonis/Core/Application";
|
|
import io from "socket.io-client";
|
|
export default class AppProvider {
|
|
constructor(protected app: ApplicationContract) {}
|
|
|
|
public register() {
|
|
// Register your own bindings
|
|
}
|
|
|
|
public async boot() {
|
|
// IoC container is ready
|
|
}
|
|
|
|
public async ready() {
|
|
// setInterval(() => {
|
|
// let socket = io("http://118.71.46.74:7777");
|
|
// socket?.emit("monitor", { name: "logs server", status: "I'm file" });
|
|
// }, 20000);
|
|
// if (this.app.environment === 'web') {
|
|
// await import('../start/socket')
|
|
// }
|
|
// App is ready
|
|
}
|
|
|
|
public async shutdown() {
|
|
// Cleanup, since app is going down
|
|
}
|
|
}
|