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

feat: Enable DRIVE_LOCATION setting for deploying multiple instances of SASjs Server

This commit is contained in:
2022-11-02 20:05:12 +05:00
parent 7e684b54a6
commit 1c9d167f86
9 changed files with 44 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ import {
ReturnCode,
setProcessVariables,
setupFolders,
setupUserAutoExec,
verifyEnvVariables
} from './utils'
import {
@@ -62,8 +63,12 @@ export default setProcessVariables().then(async () => {
// Currently only place we use it is SAS9 Mock - POST /SASLogon/login
app.use(express.urlencoded({ extended: true }))
await setupFolders()
await copySASjsCore()
await setupUserAutoExec()
if (process.driveLoc === path.join(process.sasjsRoot, 'drive')) {
await setupFolders()
await copySASjsCore()
}
// loading these modules after setting up variables due to
// multer's usage of process var process.driveLoc