2022-04-19 21:14:01 +02:00
|
|
|
import {connect, startEvents} from './webSocketsCli.js';
|
|
|
|
import { Application } from "./vendors/stimulus.js"
|
2022-04-19 21:51:43 +02:00
|
|
|
import navbarController from "./controllers/navbar_controller.js"
|
|
|
|
import todoController from "./controllers/todo_controller.js"
|
2022-04-19 22:56:42 +02:00
|
|
|
import loginController from "./controllers/login_controller.js"
|
|
|
|
import signupController from "./controllers/signup_controller.js"
|
|
|
|
|
2022-04-19 21:14:01 +02:00
|
|
|
/*
|
|
|
|
INITIALIZATION
|
|
|
|
*/
|
|
|
|
|
|
|
|
// WebSocket connection
|
|
|
|
connect();
|
|
|
|
startEvents();
|
|
|
|
|
|
|
|
// Stimulus
|
|
|
|
window.Stimulus = Application.start();
|
|
|
|
// Register all controllers
|
2022-04-19 21:51:43 +02:00
|
|
|
Stimulus.register("navbar", navbarController);
|
|
|
|
Stimulus.register("todo", todoController);
|
2022-04-19 22:56:42 +02:00
|
|
|
Stimulus.register("login", loginController);
|
|
|
|
Stimulus.register("signup", signupController);
|