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.
import FastifyEnvironmentVarsPlugin from "fastify-environment-vars";
app.register(FastifyEnvironmentVarsPlugin, {
variables: ["MY_SERVER_SECRET", "MY_CLIENT_SECRET"],
});
$ npm test
$ npm run test:integration:happy
$ npm run test:integration:unhappy
- 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 😎
andreasonny83 - Readme Template
MIT License © Alex Burley