Created
January 29, 2017 10:48
-
-
Save slaith/d6093b66ca0fd9000f8bc34d087c8e86 to your computer and use it in GitHub Desktop.
gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MongoClient = require('mongodb').MongoClient | |
, assert = rsuequire('assert'); | |
// Connection URL | |
var url = 'mongodb://localhost:27017/myproject'; | |
// Use connect method to connect to the server | |
MongoClient.connect(url, function(err, db) { | |
assert.equal(null, err); | |
console.log("Connected successfully to server"); | |
var comments=db.collection("comments"); | |
db.close(); | |
}); | |
module.exports= MongoClient |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
extends layout
block content
.container
form.form-horizontal(role='form' action="/comments" method="post")
h2 Add Event
.form-group
label.col-sm-3.control-label(for='firstName') Name
.col-sm-9
input#firstName.form-control(type='text', placeholder='Full Name', name="name" autofocus='')
span.help-block Name of the event