diff options
Diffstat (limited to 'server/lib/Cafp')
-rw-r--r-- | server/lib/Cafp/Main/Server.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/Cafp/Main/Server.hs b/server/lib/Cafp/Main/Server.hs index 5de7403..fdace52 100644 --- a/server/lib/Cafp/Main/Server.hs +++ b/server/lib/Cafp/Main/Server.hs @@ -22,9 +22,13 @@ newServer = Server <$> newTVar HMS.empty main :: IO () main = Scotty.scotty 3000 $ do - Scotty.get "/rooms/:id" $ do + Scotty.get "/rooms/:id/" $ do roomId <- Scotty.param "id" when (T.length roomId < 6) $ Scotty.raise "Room ID should be at least 6 characters" Scotty.setHeader "Content-Type" "text/html" Scotty.file "assets/client.html" + + Scotty.get "/assets/client.js" $ do + Scotty.setHeader "Content-Type" "application/JavaScript" + Scotty.file "assets/client.js" |