Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
| import { common, server } from '../options' | |
| import { showBanner } from '../utils/banner' | |
| export default { | |
| name: 'start', | |
| description: 'Start the application in production mode (the application should be compiled with `nuxt build` first)', | |
| usage: 'start <dir>', | |
| options: { | |
| ...common, | |
| ...server | |
| }, | |
| async run(cmd) { | |
| const config = await cmd.getNuxtConfig({ dev: false, _start: true }) | |
| const nuxt = await cmd.getNuxt(config) | |
| // Listen and show ready banner | |
| await nuxt.server.listen() | |
| showBanner(nuxt) | |
| } | |
| } |