Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function create(Request $req, Response $resp, array $args)
- {
- $router = (new Router())
- ->route("GET", "ws", websocket(new Chat($args['id'])));
- (new Host)
- ->name("chat.dev/room/" . $args['id'])
- ->expose("*", 1337)
- ->use($router)
- ;
- return $resp->end('success');
- }
- public static function load(Request $req, Response $resp, array $args)
- {
- $root = root(__DIR__ . "/../public");
- (new Host)
- ->name("chat.dev/room/" . $args['id'])
- ->use($root)
- ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement