mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
653f4c20ff
<!--- Provide a general summary of your changes in the title above --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Description <!--- Describe your changes in detail --> <!--- Why is this change required? What problem does it solve? --> <!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #1337" --> ## Checklist: <!--- Put an `x` in all the boxes that apply. --> <!--- If your change requires a documentation PR, please link it appropriately --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. (PR: #) - [ ] I have added tests to cover my changes (if not applicable, please state why) - [x] All new and existing tests passed. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
package.js | ||
package.json | ||
README.md | ||
rollup.config.js |
nuxt-start
Start Nuxt.js Application in production mode.
Installation
npm install --save nuxt-start
Add/Update your "start" script into your package.json
:
{
"scripts": {
"start": "nuxt-start"
}
}
Usage
nuxt-start <dir> -p <port number> -H <hostname> -c <config file>
Programmatic Usage
const { Nuxt } = require('nuxt-start')
// Require nuxt config
const config = require('./nuxt.config.js')
// Create a new nuxt instance
const nuxt = new Nuxt(config)
// Start nuxt.js server
nuxt.listen(3000) // nuxt.listen(port, host)
// Or use `nuxt.render` as an express middleware