Nuxt/packages/cli/src/commands/dev.ts

24 lines
489 B
TypeScript
Raw Normal View History

2021-04-09 15:52:45 +00:00
import { createServer } from '../utils/server'
import { buildNuxt, loadNuxt } from '../utils/nuxt'
export async function invoke (args) {
const server = createServer()
const listenPromise = server.listen({ clipboard: true })
const nuxt = await loadNuxt({
rootDir: args._[0],
for: 'dev'
})
server.setApp(nuxt.server.app)
await buildNuxt(nuxt)
await listenPromise
}
export const meta = {
usage: 'nu dev [rootDir]',
description: 'Run nuxt development server'
}