1.0.0 • Published 2 years ago

fastify-environment-vars v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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 :sunglasses:

Credits

andreasonny83 - Readme Template

License

MIT License © Alex Burley