How to use the std-env.production function in std-env

To help you get started, we’ve selected a few std-env examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bakjs / bak / packages / bak / lib / options.js View on Github external
// Validation errors
  const { validate } = options.server.routes
  if (validate.failAction === undefined) {
    validate.failAction = async (_, __, err) => {
      if (options.dev) {
        consola.error(err + '')
      }
      throw err
    }
  }

  return options
}

Options.defaults = {
  dev: !env.production && !env.test && !env.ci,
  relativeTo: '',
  routeTable: undefined,
  registrations: [],
  routes: [],
  esm: {},
  prefix: '/',
  nodemon: {},
  devErrors: {
    showErrors: undefined,
    useYouch: true,
    toTerminal: false
  },
  server: {
    cache: null,
    port: process.env.PORT || 3000,
    host: process.env.HOST || '0.0.0.0',

std-env

Runtime agnostic JS utils

MIT
Latest version published 1 month ago

Package Health Score

85 / 100
Full package analysis

Similar packages