mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 03:34:35 +00:00
chore(git): Merge branch 'master' into https-production-server
This commit is contained in:
@@ -1 +1,8 @@
|
||||
# @sasjs/server
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to configure `@sasjs/server`, add the following information to the `configuration` section of `package.json`:
|
||||
|
||||
- Provide path to SAS9 executable.
|
||||
- Provide `@sasjs/server` desired port.
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
"typescript": "^4.3.2"
|
||||
},
|
||||
"configuration": {
|
||||
"sasPath": "C:\\Program Files\\SASHome\\SASFoundation\\9.4\\sas.exe"
|
||||
"sasPath": "/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe/sas",
|
||||
"sasJsPort": 5000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,15 @@ export const processSas = async (query: ExecutionQuery): Promise<any> => {
|
||||
generateUniqueFileName(sasFile.replace(/\.sas/g, ''), '.log')
|
||||
)
|
||||
|
||||
await createFile(sasLogPath, '')
|
||||
|
||||
const sasWeboutPath = path.join(
|
||||
getTmpWeboutFolderPath(),
|
||||
generateUniqueFileName(sasFile.replace(/\.sas/g, ''), '.json')
|
||||
generateUniqueFileName(sasFile.replace(/\.sas/g, ''), '.txt')
|
||||
)
|
||||
|
||||
await createFile(sasWeboutPath, '')
|
||||
|
||||
let sasCode = await readFile(sasCodePath)
|
||||
|
||||
const vars: any = query
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import app from './app'
|
||||
import { configuration } from '../package.json'
|
||||
|
||||
const port = 5000
|
||||
const listener = app.listen(port, () => {
|
||||
console.log(`⚡️[server]: Server is running at http://localhost:${port}`)
|
||||
app.listen(configuration.sasJsPort, () => {
|
||||
console.log(
|
||||
`⚡️[server]: Server is running at http://localhost:${configuration.sasJsPort}`
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user