Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default () => ({
// Env
dev: Boolean(env.dev),
test: Boolean(env.test),
debug: undefined, // = dev
env: {},
// Mode
mode: 'universal',
modern: undefined,
// Globals
globalName: `nuxt`,
globals: {
id: globalName => `__${globalName}`,
nuxt: globalName => `$${globalName}`,
context: globalName => `__${globalName.toUpperCase()}__`,
pluginPrefix: globalName => globalName,
readyCallback: globalName => `on${capitalize(globalName)}Ready`,
import path from 'path'
import fs from 'fs'
import env from 'std-env'
const nuxtDir = fs.existsSync(path.resolve(__dirname, '..', 'package.json'))
? path.resolve(__dirname, '..') // dist
: path.resolve(__dirname, '..', '..') // src
export default {
// Information about running environment
dev: Boolean(env.dev),
debug: undefined, // = dev
// Mode
mode: 'universal',
// Server options
server: {
https: false,
port: process.env.NUXT_PORT ||
process.env.PORT ||
process.env.npm_package_config_nuxt_port,
host: process.env.NUXT_HOST ||
process.env.HOST ||
process.env.npm_package_config_nuxt_host
},