1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/test/helpers/create-nuxt.js

14 lines
354 B
JavaScript

import { Builder, Nuxt } from 'nuxt'
import config from '@baserow/config/nuxt.config.test'
export default async function createNuxt(buildAndListen = false, port = 3501) {
const nuxt = new Nuxt(config)
await nuxt.ready()
if (buildAndListen) {
await new Builder(nuxt).build()
await nuxt.server.listen(port, 'localhost')
}
return nuxt
}