@sassoftware/viya-serverjs 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +6 -6
- package/.dockerignore +2 -2
- package/.env +42 -28
- package/.env.server +32 -30
- package/.eslintignore +3 -3
- package/.eslintrc.json +42 -42
- package/Dockerfile +44 -44
- package/README.md +67 -99
- package/cli.js +9 -9
- package/lib/config.js +16 -16
- package/lib/handlers/appCallback.js +23 -24
- package/lib/handlers/codeAuth.js +17 -18
- package/lib/handlers/decodeJwt.js +3 -3
- package/lib/handlers/favicon.js +22 -25
- package/lib/handlers/getApp.js +20 -21
- package/lib/handlers/getApp2.js +22 -25
- package/lib/handlers/getUser.js +14 -17
- package/lib/handlers/index.js +3 -3
- package/lib/handlers/keepAlive.js +28 -31
- package/lib/handlers/keepAlive2.js +9 -12
- package/lib/handlers/logon.js +12 -15
- package/lib/handlers/logout.js +24 -28
- package/lib/handlers/proxyMapUri.js +6 -11
- package/lib/handlers/proxyOnResponse.js +6 -7
- package/lib/handlers/reactDev.js +22 -25
- package/lib/handlers/setCookies.js +51 -53
- package/lib/iService.js +105 -103
- package/lib/index.js +25 -30
- package/lib/parseDocker.js +3 -3
- package/lib/plugins/SASauth.js +34 -34
- package/lib/plugins/appCookie.js +35 -38
- package/lib/plugins/setContext.js +22 -25
- package/lib/plugins/setDefaultRoutes.js +71 -59
- package/lib/plugins/setupAuth.js +35 -38
- package/lib/plugins/setupUserRoutes.js +17 -16
- package/lib/plugins/token.js +9 -10
- package/lib/schemes/SASTokenScheme.js +24 -27
- package/mcpServer.js +364 -0
- package/package.json +85 -79
- package/public/data/Cluster_SDOH1.sas +181 -181
- package/public/data/Cluster_SDOH6.sas +179 -179
- package/public/data/NeuralNetwork_High_med.sas +2408 -2408
- package/public/data/NeuralNetwork_high_med1.sas +2408 -2408
- package/public/data/cars.csv +429 -429
- package/public/data/cmdList.txt +15 -15
- package/public/data/iris.csv +151 -151
- package/public/index.html +360 -350
- package/public/indexProxy.html +351 -351
- package/public/simplesubmit.html +233 -0
- package/server.js +363 -362
- package/src/config.js +90 -90
- package/src/handlers/appCallback.js +40 -40
- package/src/handlers/codeAuth.js +31 -31
- package/src/handlers/decodeJwt.js +10 -10
- package/src/handlers/favicon.js +23 -23
- package/src/handlers/getApp.js +52 -52
- package/src/handlers/getApp2.js +25 -25
- package/src/handlers/getUser.js +20 -20
- package/src/handlers/index.js +36 -36
- package/src/handlers/keepAlive.js +53 -53
- package/src/handlers/keepAlive2.js +12 -12
- package/src/handlers/logon.js +23 -23
- package/src/handlers/logout.js +42 -42
- package/src/handlers/proxyMapUri.js +25 -25
- package/src/handlers/proxyOnResponse.js +11 -11
- package/src/handlers/reactDev.js +29 -29
- package/src/handlers/setCookies.js +80 -79
- package/src/iService.js +360 -345
- package/src/index.js +247 -249
- package/src/parseDocker.js +32 -32
- package/src/plugins/SASauth.js +82 -78
- package/src/plugins/appCookie.js +50 -49
- package/src/plugins/setContext.js +33 -33
- package/src/plugins/setDefaultRoutes.js +261 -253
- package/src/plugins/setupAuth.js +49 -49
- package/src/plugins/setupUserRoutes.js +48 -47
- package/src/plugins/token.js +10 -10
- package/src/schemes/SASTokenScheme.js +43 -43
- package/src/visionIndex.html +23 -23
- package/start.sh +14 -14
- package/.env.proxy +0 -32
- package/tls/viyatls.sh +0 -3
package/.babelrc
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
"@babel/preset-env"
|
|
4
|
-
]
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
"@babel/preset-env"
|
|
4
|
+
]
|
|
5
|
+
|
|
6
|
+
}
|
package/.dockerignore
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
|
|
1
|
+
node_modules
|
|
2
|
+
|
package/.env
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
APPHOST=localhost
|
|
2
|
-
APPENTRY=index.html
|
|
3
|
-
APPLOC=./public
|
|
4
|
-
# VIYA_SERVER=
|
|
5
|
-
|
|
6
|
-
APPPORT=8080
|
|
7
|
-
APPNAME=viyaapp
|
|
8
|
-
AUTHFLOW=
|
|
9
|
-
CLIENTID=viyaapp
|
|
10
|
-
CLIENTSECRET=jellico
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
APPHOST=localhost
|
|
2
|
+
# APPENTRY=index.html
|
|
3
|
+
APPLOC=./public
|
|
4
|
+
# VIYA_SERVER=your viya server
|
|
5
|
+
|
|
6
|
+
APPPORT=8080
|
|
7
|
+
APPNAME=viyaapp
|
|
8
|
+
AUTHFLOW=code
|
|
9
|
+
CLIENTID=viyaapp
|
|
10
|
+
CLIENTSECRET=jellico
|
|
11
|
+
|
|
12
|
+
REDIRECT=
|
|
13
|
+
# APPDIR=./appDir
|
|
14
|
+
HTTPS=true
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Most modern browsers do not accept self-signed certs from localhost
|
|
18
|
+
# Options:
|
|
19
|
+
|
|
20
|
+
# 1. provide signed certificates for localhost
|
|
21
|
+
# 2. Use libraries like mkcert to create temporary trusted certs for localhost
|
|
22
|
+
# 3. Use the app server as a proxy to the Viya server to avoid CORS issues.
|
|
23
|
+
# This requires that the app redirect all Viya API calls to the app server proxy endpoint
|
|
24
|
+
# Users of restaf can simply set the APPENV_PROXY env to TRUE to enable this behavior
|
|
25
|
+
# 4. set USETOKEN to TRUE and use the token in the APPENV object to make the calls
|
|
26
|
+
// either use the proper ssl/tsl certs or use the "proxy" method
|
|
27
|
+
// to avoid CORS issues with self-signed certs
|
|
28
|
+
// so run all apps thru the proxy and call Viya from there
|
|
29
|
+
APPENV_PROXY=false
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# APPENV_PROXYSERVER=true
|
|
33
|
+
# USETOKEN=true
|
|
34
|
+
SHOWENV=true
|
|
35
|
+
|
|
36
|
+
APPENV_XYZ=AA
|
|
37
|
+
APPENV_BAD=
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
package/.env.server
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
APPHOST=localhost
|
|
2
|
-
APPENTRY=index.html
|
|
3
|
-
APPLOC=./public
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
APPHOST=localhost
|
|
2
|
+
APPENTRY=index.html
|
|
3
|
+
APPLOC=./public
|
|
4
|
+
# viya-server set preset
|
|
5
|
+
# VIYA_SERVER=
|
|
6
|
+
APPENV_PROXYSERVER=https://localhost:8080/viyaapp/proxy
|
|
7
|
+
|
|
8
|
+
APPPORT=8080
|
|
9
|
+
APPNAME=viyaapp
|
|
10
|
+
AUTHFLOW=server
|
|
11
|
+
CLIENTID=viyaapp
|
|
12
|
+
CLIENTSECRET=jellico
|
|
13
|
+
REDIRECT=/new
|
|
14
|
+
# APPDIR=./appDir
|
|
15
|
+
# HTTPS=true
|
|
16
|
+
USELOGON=YES
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
USETOKEN=YES
|
|
20
|
+
# SHOWENV=YES
|
|
21
|
+
# APPENV=
|
|
22
|
+
APPENV_XYZ=AA
|
|
23
|
+
APPENV_BAD=
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# NAMESPACE=viya
|
|
28
|
+
# TLS_CERT=./certs/tls.crt
|
|
29
|
+
# TLS_KEY=./certs/tls.key
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
package/.eslintignore
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
public
|
|
3
|
-
env
|
|
1
|
+
node_modules
|
|
2
|
+
public
|
|
3
|
+
env
|
|
4
4
|
lib
|
package/.eslintrc.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": {
|
|
4
|
-
"browser": true,
|
|
5
|
-
"node": true,
|
|
6
|
-
"es6": true
|
|
7
|
-
},
|
|
8
|
-
"parser": "@babel/eslint-parser",
|
|
9
|
-
"extends": ["eslint:recommended", "prettier"],
|
|
10
|
-
"parserOptions": {
|
|
11
|
-
"requireConfigFile": false,
|
|
12
|
-
"babelOptions": {"configFile": "./.babelrc"},
|
|
13
|
-
"ecmaVersion": 6,
|
|
14
|
-
"sourceType": "module",
|
|
15
|
-
"ecmaFeatures": {
|
|
16
|
-
"jsx": true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"rules": {
|
|
20
|
-
"key-spacing": [
|
|
21
|
-
2,
|
|
22
|
-
{
|
|
23
|
-
"align": "colon"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"jsx-quotes": [2, "prefer-double"],
|
|
27
|
-
"no-console": 0,
|
|
28
|
-
"no-unused-vars": [
|
|
29
|
-
1,
|
|
30
|
-
{
|
|
31
|
-
"args": "none"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"no-debugger": 0,
|
|
35
|
-
"react/prop-types": 0,
|
|
36
|
-
"array-bracket-spacing": [2, "never"],
|
|
37
|
-
"space-in-parens": [2, "never"],
|
|
38
|
-
"space-before-function-paren": [2, "always"],
|
|
39
|
-
"semi": [2, "always"],
|
|
40
|
-
"no-prototype-builtins": 0
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"env": {
|
|
4
|
+
"browser": true,
|
|
5
|
+
"node": true,
|
|
6
|
+
"es6": true
|
|
7
|
+
},
|
|
8
|
+
"parser": "@babel/eslint-parser",
|
|
9
|
+
"extends": ["eslint:recommended", "prettier"],
|
|
10
|
+
"parserOptions": {
|
|
11
|
+
"requireConfigFile": false,
|
|
12
|
+
"babelOptions": {"configFile": "./.babelrc"},
|
|
13
|
+
"ecmaVersion": 6,
|
|
14
|
+
"sourceType": "module",
|
|
15
|
+
"ecmaFeatures": {
|
|
16
|
+
"jsx": true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"rules": {
|
|
20
|
+
"key-spacing": [
|
|
21
|
+
2,
|
|
22
|
+
{
|
|
23
|
+
"align": "colon"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"jsx-quotes": [2, "prefer-double"],
|
|
27
|
+
"no-console": 0,
|
|
28
|
+
"no-unused-vars": [
|
|
29
|
+
1,
|
|
30
|
+
{
|
|
31
|
+
"args": "none"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"no-debugger": 0,
|
|
35
|
+
"react/prop-types": 0,
|
|
36
|
+
"array-bracket-spacing": [2, "never"],
|
|
37
|
+
"space-in-parens": [2, "never"],
|
|
38
|
+
"space-before-function-paren": [2, "always"],
|
|
39
|
+
"semi": [2, "always"],
|
|
40
|
+
"no-prototype-builtins": 0
|
|
41
|
+
}
|
|
42
|
+
}
|
package/Dockerfile
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
FROM node:12.16.1-alpine
|
|
2
|
-
LABEL maintainer="deva.kumar@sas.com"
|
|
3
|
-
WORKDIR /usr/src/app
|
|
4
|
-
COPY . .
|
|
5
|
-
# COPY package*.json ./
|
|
6
|
-
RUN npm install
|
|
7
|
-
# RUN npm run build
|
|
8
|
-
|
|
9
|
-
# will auto change to localhost in non-docker environments
|
|
10
|
-
ENV APPHOST=0.0.0.0
|
|
11
|
-
ENV PORT=8080
|
|
12
|
-
EXPOSE 8080
|
|
13
|
-
ENV HTTPS=true
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ENV
|
|
25
|
-
ENV
|
|
26
|
-
ENV
|
|
27
|
-
# ENV
|
|
28
|
-
# ENV
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
# Samesite specification
|
|
38
|
-
ENV SAMESITE=None,secure
|
|
39
|
-
|
|
40
|
-
# If your Viya instance still has a unsigned certificate set this value prior to invoking the server
|
|
41
|
-
# ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
42
|
-
|
|
43
|
-
#####################################################################
|
|
44
|
-
CMD ["npm", "run", "indocker"]
|
|
1
|
+
FROM node:12.16.1-alpine
|
|
2
|
+
LABEL maintainer="deva.kumar@sas.com"
|
|
3
|
+
WORKDIR /usr/src/app
|
|
4
|
+
COPY . .
|
|
5
|
+
# COPY package*.json ./
|
|
6
|
+
RUN npm install
|
|
7
|
+
# RUN npm run build
|
|
8
|
+
|
|
9
|
+
# will auto change to localhost in non-docker environments
|
|
10
|
+
ENV APPHOST=0.0.0.0
|
|
11
|
+
ENV PORT=8080
|
|
12
|
+
EXPOSE 8080
|
|
13
|
+
ENV HTTPS=true
|
|
14
|
+
ENV VIYA_SERVER=
|
|
15
|
+
# ENV APPSERVERLEVEL=v2
|
|
16
|
+
#######################################################################
|
|
17
|
+
# You can override these(but in container leave APPHOST as shown below)
|
|
18
|
+
########################################################################
|
|
19
|
+
|
|
20
|
+
# set this the same as EXPOSE here and override in env or as -p option in dockerrun
|
|
21
|
+
# ENV APPPORT=8080
|
|
22
|
+
|
|
23
|
+
ENV APPNAME=viyaapp
|
|
24
|
+
ENV AUTHFLOW=server
|
|
25
|
+
ENV CLIENTID=viyaapp
|
|
26
|
+
ENV CLIENTSECRET=
|
|
27
|
+
# ENV HAPIDEBUG=NO
|
|
28
|
+
# ENV LOGLEVEL=info
|
|
29
|
+
# ENV USETOKEN=YES
|
|
30
|
+
|
|
31
|
+
# specify ssl/tls cert and key in a folder
|
|
32
|
+
# example below
|
|
33
|
+
ENV SSLCERT=c:/Users/kumar/.tls
|
|
34
|
+
#sample setup for creating a temporary cert and key
|
|
35
|
+
ENV TLS_CREATE="C:US,ST:NC,L:Cary,O:SAS Institute,OU:STO,CN:localhost"
|
|
36
|
+
|
|
37
|
+
# Samesite specification
|
|
38
|
+
ENV SAMESITE=None,secure
|
|
39
|
+
|
|
40
|
+
# If your Viya instance still has a unsigned certificate set this value prior to invoking the server
|
|
41
|
+
# ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
42
|
+
|
|
43
|
+
#####################################################################
|
|
44
|
+
CMD ["npm", "run", "indocker"]
|
package/README.md
CHANGED
|
@@ -1,99 +1,67 @@
|
|
|
1
|
-
# `Application
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
ENV USETOKEN=NO
|
|
69
|
-
|
|
70
|
-
CMD ["npx", "@sassoftware/viya-appserverjs"]
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### `Running with SSL enabled -- Recommended`
|
|
75
|
-
|
|
76
|
-
This is the recommended setting. This will also make browsers like Chrome run with the SAMESITE settings set to Default - your users will thank you.
|
|
77
|
-
|
|
78
|
-
Make sure you specify the VIYA_SERVER with a protocol of https.
|
|
79
|
-
|
|
80
|
-
### `TLS certificates`
|
|
81
|
-
|
|
82
|
-
- Option 1: Let server create a temporary unsigned certificate
|
|
83
|
-
|
|
84
|
-
```env
|
|
85
|
-
ENV TLS_CREATE=C:US,ST:NC,L:Cary,O:YourCompany,OU:yourgroup,CN:localhost
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
- Option 2: Provide your own key and certificate key
|
|
89
|
-
|
|
90
|
-
```env
|
|
91
|
-
ENV TLS_KEY=../certs/self/key.pem
|
|
92
|
-
ENV TLS_CERT=../certs/self/certificate.pem
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
- Option 3: Provide key and certificate as a pfx file
|
|
96
|
-
|
|
97
|
-
```env
|
|
98
|
-
ENV TLS_PFX=../certs/sascert/sascert2.pfx
|
|
99
|
-
```
|
|
1
|
+
# `Application server for use with SAS Viya`
|
|
2
|
+
|
|
3
|
+
viya-serverjs is a app server designed to support user written SAS Viya applications. The applications can be written using any framework.
|
|
4
|
+
|
|
5
|
+
Key features:
|
|
6
|
+
|
|
7
|
+
1. Handles authentication
|
|
8
|
+
2. Extendable with additional end points
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Use npx command to start the server
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx @sassoftware/viya-serverjs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## `Basic configuration`
|
|
19
|
+
|
|
20
|
+
Configure the server using a .env file
|
|
21
|
+
|
|
22
|
+
### `Sample env file`
|
|
23
|
+
|
|
24
|
+
>[Note] Sample values shown below. See Advanced section for other ways to configure the server
|
|
25
|
+
|
|
26
|
+
```env
|
|
27
|
+
|
|
28
|
+
# Base setup
|
|
29
|
+
# With the configuration below the app server url will be
|
|
30
|
+
# https://localhost:8080/viyaapp
|
|
31
|
+
#
|
|
32
|
+
APPHOST=localhost
|
|
33
|
+
APPPORT=8080
|
|
34
|
+
HTTPS=true
|
|
35
|
+
APPNAME=viyaapp
|
|
36
|
+
|
|
37
|
+
# Most modern browsers will reject self-signed certs from localhost
|
|
38
|
+
# And SAS Viya might also refuse connection.
|
|
39
|
+
# Supply your own SSL/TLS values in a folder. All files in this folder will be used.
|
|
40
|
+
# Options:
|
|
41
|
+
# 1. provide signed certificates for localhost
|
|
42
|
+
# 2. Use libraries like mkcert to create temporary trusted certs for localhost
|
|
43
|
+
# 3. For other options see the Advanced Section
|
|
44
|
+
SSLCERT=./tls
|
|
45
|
+
|
|
46
|
+
# AUTHENTICATION
|
|
47
|
+
VIYA_SERVER=<viya servrer url>
|
|
48
|
+
|
|
49
|
+
# By default it uses authorization_code flow
|
|
50
|
+
|
|
51
|
+
CLIENTID=<clientid>
|
|
52
|
+
CLIENTSECRET=<clientSecret if present>
|
|
53
|
+
AUTHFLOW=code|pkce
|
|
54
|
+
|
|
55
|
+
##########################
|
|
56
|
+
# Read the Advanced Section in the README before turning on these options
|
|
57
|
+
#
|
|
58
|
+
APPENV_PROXY=false
|
|
59
|
+
USETOKEN=false
|
|
60
|
+
|
|
61
|
+
APPENV_A=somevalue
|
|
62
|
+
APPENV_B=somevalue
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
package/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/*
|
|
3
|
-
* Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
let core = require('./lib/index.js');
|
|
8
|
-
console.log('Starting the cli for @sassoftware/viya-serverjs');
|
|
9
|
-
core(null, true, 'app', null);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
let core = require('./lib/index.js');
|
|
8
|
+
console.log('Starting the cli for @sassoftware/viya-serverjs');
|
|
9
|
+
core(null, true, 'app', null);
|
package/lib/config.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ------------------------------------------------------------------------------------
|
|
3
|
-
* * Copyright (c) SAS Institute Inc.
|
|
4
|
-
* * Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* * you may not use this file except in compliance with the License.
|
|
6
|
-
* * You may obtain a copy of the License at
|
|
7
|
-
* *
|
|
8
|
-
* * http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
* *
|
|
10
|
-
* * Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* * distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* * See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
* ----------------------------------------------------------------------------------------
|
|
16
|
-
*
|
|
1
|
+
/*
|
|
2
|
+
* ------------------------------------------------------------------------------------
|
|
3
|
+
* * Copyright (c) SAS Institute Inc.
|
|
4
|
+
* * Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* * you may not use this file except in compliance with the License.
|
|
6
|
+
* * You may obtain a copy of the License at
|
|
7
|
+
* *
|
|
8
|
+
* * http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
* *
|
|
10
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* * distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* * See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
* ----------------------------------------------------------------------------------------
|
|
16
|
+
*
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
'use strict';
|