|
|
|
@ -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)
|
|
|
|
|