mirror of
https://github.com/sasjs/server.git
synced 2026-01-08 23:10:05 +00:00
fix: desktop mode web index.html js script included
This commit is contained in:
@@ -31,7 +31,6 @@ app.use(cookieParser())
|
|||||||
app.use(morgan('tiny'))
|
app.use(morgan('tiny'))
|
||||||
app.use(express.json({ limit: '50mb' }))
|
app.use(express.json({ limit: '50mb' }))
|
||||||
app.use(express.static(path.join(__dirname, '../public')))
|
app.use(express.static(path.join(__dirname, '../public')))
|
||||||
app.use(express.static(getWebBuildFolderPath()))
|
|
||||||
|
|
||||||
const onError: ErrorRequestHandler = (err, req, res, next) => {
|
const onError: ErrorRequestHandler = (err, req, res, next) => {
|
||||||
console.error(err.stack)
|
console.error(err.stack)
|
||||||
@@ -44,6 +43,10 @@ export default setProcessVariables().then(async () => {
|
|||||||
const { setupRoutes } = await import('./routes/setupRoutes')
|
const { setupRoutes } = await import('./routes/setupRoutes')
|
||||||
setupRoutes(app)
|
setupRoutes(app)
|
||||||
|
|
||||||
|
// should be served after setting up web route
|
||||||
|
// index.html needs to be injected with some js script.
|
||||||
|
app.use(express.static(getWebBuildFolderPath()))
|
||||||
|
|
||||||
console.log('sasJSCoreMacros', sasJSCoreMacros)
|
console.log('sasJSCoreMacros', sasJSCoreMacros)
|
||||||
|
|
||||||
app.use(onError)
|
app.use(onError)
|
||||||
|
|||||||
Reference in New Issue
Block a user