Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

split the methods out so that we can use custom routes #18

Open
okdistribute opened this issue Feb 10, 2017 · 0 comments
Open

split the methods out so that we can use custom routes #18

okdistribute opened this issue Feb 10, 2017 · 0 comments

Comments

@okdistribute
Copy link
Collaborator

okdistribute commented Feb 10, 2017

For example, adding a few functions: .get(key).pipe(res), .file(key, filename).pipe(res)

var hyperdrivehttp = require('hyperdrive-http')
var express = require('express')

var router = express()
var drive = hyperdrivehttp(getArchive)

router.get('/hi/:key', function (req, res) {
  drive.get(req.params.key).pipe(res)
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant