1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-07 06:30:06 +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

@@ -1,19 +1,7 @@
import { createFile, createFolder, fileExists } from '@sasjs/utils'
import {
getDesktopUserAutoExecPath,
getFilesFolder,
getPackagesFolder
} from './file'
import { ModeType } from './verifyEnvVariables'
import { createFolder } from '@sasjs/utils'
import { getFilesFolder, getPackagesFolder } from './file'
export const setupFolders = async () => {
const drivePath = getFilesFolder()
await createFolder(drivePath)
await createFolder(getFilesFolder())
await createFolder(getPackagesFolder())
if (process.env.MODE === ModeType.Desktop) {
if (!(await fileExists(getDesktopUserAutoExecPath()))) {
await createFile(getDesktopUserAutoExecPath(), '')
}
}
}