Under the hood orientdb client is used, the options that you pass to register
will be passed to the orientdb connection.
npm i fastify-orientdb --save
Add it to you project with register
and you are done!
You can access the Orientdb Connection via fastify.db
.
const fastify = require('fastify')
fastify.register(require('fastify-orientdb'), {
host: 'localhost',
port: 2424,
username: 'admin',
password: 'admin',
name: 'GratefulDeadCocnerts'
}, err => {
if (err) throw err
})
fastify.listen(3000, err => {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})
Licensed under MIT.