Working ts

This commit is contained in:
2022-11-16 19:28:29 +01:00
parent d61f17a0f3
commit de3f10b3ee
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import path from 'path'
import fs from 'fs/promises'
import express from 'express'
import express, { Handler, Router } from 'express'
import morgan from 'morgan'
import { createServer as createViteServer } from 'vite'
@@ -21,7 +21,7 @@ if (config.isDevelopment) {
console.log(`[Config] PORT = ${config.port}`)
}
function mountIndexHtmlRoutes(r, serveIndexHtml) {
function mountIndexHtmlRoutes(r: Router, serveIndexHtml: Handler) {
for (const route of HTML_ROUTES) {
console.log(`[Server] Mounted index html for "${route}"`)
r.get(route, serveIndexHtml)