node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

hyperkv-server

hyperkv-server

A basic API server built with hyperkv & hyperlog.

Install

npm install --save hyperkv-server

Usage

var http = require('http')
var memdb = require('memdb')
var router = require('hyperkv-server')(memdb(), { valueEncoding: 'json' })
 
var server = http.createServer(function (req, res) {
  router.match(req, res)
})
 
server.listen(3333, function () {
  console.log('started on http://127.0.0.1:3333')
})

Examples

See more examples in the examples directory

License

MIT