How to use the react-static/node.start function in react-static

To help you get started, we’ve selected a few react-static examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timberio / gitdocs / bin / commands / serve.js View on Github external
module.exports = function handler ({ output, port, path }) {
  if (path) {
    console.log(chalk.green(`Serving from: ${path}`))
    serve(path, {
      port,
    })
  } else {
    console.log('Serving from: docs...')
    const config = getConfig({ output })
    start({
      config,
    })
  }
}