mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
fix(autoexec): usage in case of desktop from file
This commit is contained in:
@@ -30,9 +30,7 @@ dotenv.config()
|
||||
|
||||
instantiateLogger()
|
||||
|
||||
if (verifyEnvVariables()) {
|
||||
process.exit(ReturnCode.InvalidEnv)
|
||||
}
|
||||
if (verifyEnvVariables()) process.exit(ReturnCode.InvalidEnv)
|
||||
|
||||
const app = express()
|
||||
|
||||
@@ -85,7 +83,7 @@ app.use(
|
||||
/***********************************
|
||||
* Enabling CORS *
|
||||
***********************************/
|
||||
if (MODE === ModeType.Server || CORS === CorsType.ENABLED) {
|
||||
if (CORS === CorsType.ENABLED) {
|
||||
const whiteList: string[] = []
|
||||
WHITELIST?.split(' ')
|
||||
?.filter((url) => !!url)
|
||||
@@ -125,6 +123,7 @@ if (MODE === ModeType.Server) {
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
app.use(express.json({ limit: '100mb' }))
|
||||
app.use(express.static(path.join(__dirname, '../public')))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user