registerRoutes() {
    // Testing routes
    this.server.get('/ping', this.routeHandlers.pingHandler.bind(this.routeHandlers));
    this.server.get('/code', this.routeHandlers.codeHandler.bind(this.routeHandlers));
    // this.server.post('/message', this.routeHandlers.sendMessageHandler.bind(this.routeHandlers));
    this.server.post('/messages', this.routeHandlers.fetchManyMessagesHandler.bind(this.routeHandlers));
    // this.server.post('/socket', this.routeHandlers.createSocketHandler.bind(this.routeHandlers));
    // this.server.get('/sockets', this.routeHandlers.fetchManySocketsHandler.bind(this.routeHandlers));
    // this.server.post('/user', this.routeHandlers.createUserHandler.bind(this.routeHandlers));
    // this.server.get('/user', this.routeHandlers.fetchOneUserHandler.bind(this.routeHandlers));

    // login
    this.server.post('/auth', this.routeHandlers.authHandler.bind(this.routeHandlers));

    // logoff
    this.server.post('/logoff', this.routeHandlers.authHandler.bind(this.routeHandlers));
  }
/**
     * Register API routes and connect them with route handlers
     */
Register API routes and connect them with route handlers
Register API routes and connect them with route handlers
registerRoutes() {
    this.server.get('/ping', this.routeHandlers.pingHandler.bind(this.routeHandlers));
    this.server.get('/code', this.routeHandlers.codeHandler.bind(this.routeHandlers));
    this.server.post('/messages', this.routeHandlers.fetchManyMessagesHandler.bind(this.routeHandlers));
    this.server.post('/auth', this.routeHandlers.authHandler.bind(this.routeHandlers));
    this.server.post('/logoff', this.routeHandlers.authHandler.bind(this.routeHandlers));
  }
registerRoutes ( ) { this . server . get ( '/ping' , this . routeHandlers . pingHandler . bind ( this . routeHandlers ) ) ; this . server . get ( '/code' , this . routeHandlers . codeHandler . bind ( this . routeHandlers ) ) ; this . server . post ( '/messages' , this . routeHandlers . fetchManyMessagesHandler . bind ( this . routeHandlers ) ) ; this . server . post ( '/auth' , this . routeHandlers . authHandler . bind ( this . routeHandlers ) ) ; this . server . post ( '/logoff' , this . routeHandlers . authHandler . bind ( this . routeHandlers ) ) ; }
Register API routes and connect them with route handlers
Register API routes and connect them with route handlers
// Testing routes // this.server.post('/message', this.routeHandlers.sendMessageHandler.bind(this.routeHandlers)); // this.server.post('/socket', this.routeHandlers.createSocketHandler.bind(this.routeHandlers)); // this.server.get('/sockets', this.routeHandlers.fetchManySocketsHandler.bind(this.routeHandlers)); // this.server.post('/user', this.routeHandlers.createUserHandler.bind(this.routeHandlers)); // this.server.get('/user', this.routeHandlers.fetchOneUserHandler.bind(this.routeHandlers)); // login // logoff