1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

feat: App Stream, load on startup, new route added

This commit is contained in:
Saad Jutt
2022-03-21 17:17:29 +05:00
parent b0fb858c49
commit 98a00ec7ac
17 changed files with 265 additions and 47 deletions

View File

@@ -8,6 +8,7 @@ import cors from 'cors'
import {
connectDB,
getWebBuildFolderPath,
loadAppStreamConfig,
sasJSCoreMacros,
setProcessVariables
} from './utils'
@@ -43,6 +44,8 @@ export default setProcessVariables().then(async () => {
const { setupRoutes } = await import('./routes/setupRoutes')
setupRoutes(app)
await loadAppStreamConfig()
// should be served after setting up web route
// index.html needs to be injected with some js script.
app.use(express.static(getWebBuildFolderPath()))