Skip to content

Techie-Qabila/fastify-orientdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastify-orientdb

js-standard-style npm version npm downloads

Under the hood orientdb client is used, the options that you pass to register will be passed to the orientdb connection.

Install

npm i fastify-orientdb --save

Usage

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}`)
})

License

Licensed under MIT.