diff --git a/index.ts b/index.ts index 08fe64b..4c992c1 100644 --- a/index.ts +++ b/index.ts @@ -122,6 +122,9 @@ app.put('/api/:tokenRead/:tokenWrite', async (request, response) => { return response.status(201).json({ readToken: tokenRead, writeToken: tokenWrite }); }); -app.use("/*", express.static(path.join(__dirname, './ui/dist'))) +app.use(express.static(path.join(__dirname, './ui/dist'), {})) +app.get('/*', function(req, res) { + res.sendFile(path.join(__dirname, './ui/dist/index.html')); +}); -app.listen(serverPort, () => console.log(`Listening on http://127.0.0.1:${serverPort}`)); \ No newline at end of file +app.listen(Number(serverPort), () => console.log(`Listening on http://127.0.0.1:${serverPort}`)); \ No newline at end of file