Nuxt/packages/nitro/src/presets/server.ts
pooya parsa 6318438415
feat(nitro, vite): use native module (#252)
Co-authored-by: Daniel Roe <daniel@roe.dev>
2021-07-15 11:38:06 +02:00

15 lines
474 B
TypeScript

import consola from 'consola'
import { extendPreset, hl, prettyPath } from '../utils'
import { NitroPreset, NitroContext } from '../context'
import { node } from './node'
export const server: NitroPreset = extendPreset(node, {
entry: '{{ _internal.runtimeDir }}/entries/server',
serveStatic: true,
hooks: {
'nitro:compiled' ({ output }: NitroContext) {
consola.success('Ready to run', hl('node ' + prettyPath(output.serverDir) + '/index.mjs'))
}
}
})