fastify-environment-vars
v1.0.0
Published
[![npm version](https://badge.fury.io/js/fastify-environment-vars.svg)](https://badge.fury.io/js/fastify-environment-vars) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier
Downloads
8
Readme
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :sunglasses:
Credits
andreasonny83 - Readme Template
License
MIT License © Alex Burley