Skip to content
Safe env vars handling sample by Nuxt.js project
Branch: master
Clone or download
Latest commit b64a6b2 Jul 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
rules feat: Chian is good Jul 2, 2019
src feat: Chian is good Jul 2, 2019
.eslintignore feat: Chian is good Jul 2, 2019
.eslintrc.js feat: Chian is good Jul 2, 2019
.gitignore
README.md
nuxt.config.ts feat: Chian is good Jul 2, 2019
package.json
tsconfig.json
yarn.lock

README.md

how-to-safety-env-use-in-nuxt

Structure

  • Typesafe environments
    • Inject to Vue prototype object
    • Overwrite Vue SFC type definition
  • Failsafe launch application
    • Automatically terminate the process if no environment variable is found
  • Customized ESLint rule
    • Prohibit direct use of process.env

Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

For detailed explanation on how things work, checkout Nuxt.js docs.

You can’t perform that action at this time.