Skip to content

Commit

Permalink
Use sub router for multiple instances
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Sep 29, 2015
1 parent 617bf13 commit 6ace6a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var app = require('express')();
var express = require('express');

var routes = {
'db': require('./lib/routes/db.js'),
Expand All @@ -10,6 +10,8 @@ var routes = {

module.exports = function(PouchDB) {

var app = express.Router();

app.use(function (req, res, next) {
for (var prop in req.query) {
try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pouchdb-express-router",
"version": "0.0.7",
"version": "0.0.8",
"description": "Provide minimal routing and functionality to provide a PouchDB server that replicates",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit 6ace6a4

Please sign in to comment.