Skip to content

Commit

Permalink
Add simple stub server
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Nov 23, 2017
1 parent f657399 commit 2190ac0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "Provide minimal routing and functionality to provide a PouchDB server that replicates",
"main": "index.js",
"dependencies": {
"extend": "~2.0.0",
"express": "~4.10.2",
"bluebird": "~2.3.11",
"body-parser": "~1.9.2",
"raw-body": "~1.3.0",
"express": "~4.10.2",
"extend": "~2.0.0",
"multiparty": "~4.0.0",
"nodemon": "~1.2.1",
"bluebird": "~2.3.11",
"multiparty": "~4.0.0"
"raw-body": "~1.3.0"
},
"devDependencies": {},
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

// PouchDB is not a dependency of pouchdb-express-router so to run
// this example server you will need to `npm install pouchdb`
// TODO: would be nice to have the error message say that.
var PouchDB = require('pouchdb');

var router = require('./index.js');
var app = require('express')();

const PORT = process.env.PORT || 5984;

app.use(router(PouchDB));
app.listen(PORT);

0 comments on commit 2190ac0

Please sign in to comment.