Skip to content

Consider removing dotenv #600

@frankieroberto

Description

@frankieroberto

Should we remove dotenv from the kit as a dependency? Or make it a devDependency?

Currently it's included with the kit, including in production mode, but most hosts like Heroku or Railway have their own way to configure environment variables.

Whilst .env files are useful, we also have other ways to configure things:

app/config.js - eg sevice name and port can be set here
app/locals.js - for anything you want to be able to access in Nunjucks views

If dotenv were removed, people could still use it by either installing the command line tool (dotenv-cli globally and using dotenv npm run watch, or just adding it back in to their package.json manually.

Alternatively, we could keep it in but move it to devDependencies?

Either way, we can continue to keep .env in the .gitignore to prevent the files from being accidentally committed to GitHub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions