Fastify plugin for instantiating and encapsulating the Evervault client.
npm i fastify-evervault
Add it to your project with register
, passing in your Evervault API key.
const fastify = require('fastify')()
fastify.register(require('fastify-evervault'), {
apiKey: 'ev:key:...',
})
fastify.get('/', async (request, reply) => {
const { evervault } = fastify
const encrypted = await evervault.encrypt('Hello World!')
return encrypted
})
fastify.listen({ port: 3000 }, err => {
if (err) throw err
})
See the Evervault Node.js SDK for more information on the Evervault client.
MIT