Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomduncalf/00070fecb68a6cf35c0102c75f166a8a to your computer and use it in GitHub Desktop.
Save tomduncalf/00070fecb68a6cf35c0102c75f166a8a to your computer and use it in GitHub Desktop.
app.js gist for running react-static dev server with Phusion Passenger
const pkg = require('react-static/package.json');
let packageConfig = {};
try {
packageConfig = require(path.resolve(process.cwd(), 'package.json'));
packageConfig = packageConfig['react-static'] || {};
} catch (err) {
}
const argv = {};
const options = {
version: argv.version || argv.v || argv.V,
configPath: argv.config || argv.c || argv.C,
name: argv.name || argv.n || argv.N,
template: argv.template || argv.t || argv.T,
staging: argv.staging || argv.s || argv.S,
debug: argv.debug || argv.d || argv.D,
incremental: argv.incremental || argv.i || argv.I,
analyze: argv.analyze || argv.a || argv.A,
isCLI: true,
packageConfig,
};
require('react-static/lib/utils/binHelper')
require('react-static/lib/commands/start').default(options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment