mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 03:05:24 +08:00
30 lines
809 B
JavaScript
Executable File
30 lines
809 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const util = require('./util');
|
|
const program = require('commander');
|
|
const serve = require('../serve');
|
|
|
|
//==============================================================================
|
|
// Setting up the program command line arguments.
|
|
//==============================================================================
|
|
|
|
program
|
|
.option('-j, --jobs', 'enable job processing on this thread')
|
|
.option(
|
|
'--disabled-jobs <jobs>',
|
|
'disable jobs specified if the -j option is passed, specified as a comma separated list',
|
|
val => val.split(','),
|
|
[]
|
|
)
|
|
.option(
|
|
'-w, --websockets',
|
|
'enable the websocket (subscriptions) handler on this thread'
|
|
)
|
|
.parse(process.argv);
|
|
|
|
// Start serving.
|
|
serve(program).catch(err => {
|
|
console.error(err);
|
|
util.shutdown(1);
|
|
});
|