mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 05:35:42 +08:00
32 lines
1000 B
JavaScript
Executable File
32 lines
1000 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
// Perform rewrites to the runtime environment variables based on the contents
|
|
// of the process.env.REWRITE_ENV if it exists. This is done here as it is the
|
|
// entrypoint for the entire application.
|
|
require('env-rewrite').rewrite();
|
|
|
|
/**
|
|
* Module dependencies.
|
|
*/
|
|
|
|
const program = require('commander');
|
|
const pkg = require('../package.json');
|
|
|
|
//==============================================================================
|
|
// Setting up the program command line arguments.
|
|
//==============================================================================
|
|
|
|
program
|
|
.version(pkg.version)
|
|
.command('serve', 'serve the application')
|
|
.command('assets', 'interact with assets')
|
|
.command('settings', 'work with the application settings')
|
|
.command('jobs', 'work with the job queues')
|
|
.command('users', 'work with the application auth')
|
|
.parse(process.argv);
|
|
|
|
// If there is no command listed, output help.
|
|
if (!process.argv.slice(2).length) {
|
|
program.outputHelp();
|
|
}
|