dtwo-start
Start Dtwo Application in production mode.
Installation
npm install --save dtwo-start
Add/Update your "start" script into your package.json
:
{
"scripts": {
"start": "dtwo-start"
}
}
Usage
dtwo-start <dir> -p <port number> -H <hostname> -c <config file>
Programmatic Usage
const { Dtwo } = require('dtwo-start')
// Require dtwo config
const config = require('./dtwo.config.js')
// Create a new dtwo instance (config needs dev: false)
const dtwo = new Dtwo(config)
// Start dtwo server
dtwo.listen(3000) // dtwo.listen(port, host)
// Or use `dtwo.render` as an express middleware