How to use the @adonisjs/sink.EnvFile function in @adonisjs/sink

To help you get started, we’ve selected a few @adonisjs/sink 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 AdonisCommunity / create-adonis-ts-app / tasks / createEnvFile.ts View on Github external
const task: TaskFn = (absPath) => {
  const env = new EnvFile(absPath)

  env.set('PORT', '3333')
  env.set('HOST', '0.0.0.0')
  env.set('NODE_ENV', 'development')
  env.set('APP_KEY', randomstring.generate(32))

  env.commit()
  logger.create('.env, .env.example')
}