@live-change/cli 0.1.7 → 0.1.8
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/bin/lcli.js +8 -2
- package/package.json +1 -1
package/bin/lcli.js
CHANGED
|
@@ -109,6 +109,11 @@ function ssrServerOptions(yargs) {
|
|
|
109
109
|
describe: 'start internal api server',
|
|
110
110
|
type: 'boolean'
|
|
111
111
|
})
|
|
112
|
+
yargs.option('sessionExpires', {
|
|
113
|
+
describe: 'session expires after (in minutes)',
|
|
114
|
+
type: 'number',
|
|
115
|
+
default: 30*24*60
|
|
116
|
+
})
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
const argv = require('yargs') // eslint-disable-line
|
|
@@ -195,7 +200,7 @@ async function apiServer(argv) {
|
|
|
195
200
|
console.log('Listening on port ' + apiPort)
|
|
196
201
|
}
|
|
197
202
|
async function ssrServer(argv, dev) {
|
|
198
|
-
const { ssrRoot, ssrPort, ssrHost, apiHost, apiPort } = argv
|
|
203
|
+
const { ssrRoot, ssrPort, ssrHost, apiHost, apiPort, sessionExpires } = argv
|
|
199
204
|
|
|
200
205
|
const expressApp = express()
|
|
201
206
|
|
|
@@ -250,7 +255,8 @@ async function ssrServer(argv, dev) {
|
|
|
250
255
|
: {
|
|
251
256
|
apiHost, apiPort
|
|
252
257
|
}
|
|
253
|
-
)
|
|
258
|
+
),
|
|
259
|
+
...(sessionExpires ? { sessionExpires: sessionExpires * 60 * 1000 } : {})
|
|
254
260
|
})
|
|
255
261
|
|
|
256
262
|
await ssrServer.start()
|