fastify-environment-vars
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

npm version code style: prettier

Project Name

A super lightweight plugin to check for environment variables on server start. The only dependency is fastify-plugin. For more supported packages that use JSON schema see fastify-env.

Table of contents

Usage

import FastifyEnvironmentVarsPlugin from "fastify-environment-vars";

app.register(FastifyEnvironmentVarsPlugin, {
  variables: ["MY_SERVER_SECRET", "MY_CLIENT_SECRET"],
});

Running the tests

$ npm test
$ npm run test:integration:happy
$ npm run test:integration:unhappy

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request 😎

Credits

andreasonny83 - Readme Template

License

MIT License © Alex Burley

Readme

Keywords

none

Package Sidebar

Install

npm i fastify-environment-vars

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

6.37 kB

Total Files

6

Last publish

Collaborators

  • burlzad