Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. var express = require('express');
  2. var couchdb = require('couchdb');
  3. var client = couchdb.createClient({port:5984,host:'localhost'});
  4. var db = client.db('tornado_development');
  5.  
  6.  
  7. app.get('/', function(req, res, next){
  8. db.view('Song','all', function(err, records){
  9. if(err){
  10. next(err);
  11. }else{
  12. res.send('oh cool... we found something');
  13. };
  14. });
  15. });
Add Comment
Please, Sign In to add comment