How can I create doc in MongoDB?
<p>I am learning MongoDB with Youtube video(<a href="https://youtu.be/uX2G7Rt51WI?list=PLRQuJcU2aZG-aMedJxa7p7ylYmOn5iMlS" rel="nofollow">https://youtu.be/uX2G7Rt51WI?list=PLRQuJcU2aZG-aMedJxa7p7ylYmOn5iMlS</a>) which I am following his code.</p>

<p>I don't think I made typo and I just think I missed some part but I don't know which part I missed.</p>

<p>I think he may create doc file somewhere in MongoDB, but I don't know where and how he made.</p>

<p>This is my code.</p>

<pre><code>var http = require('http'),
    express = require('express'),
    app = express(),
    cons = require('consolidate'),
    MongoClient = require('mongodb')
    .MongoClient,
    Server = require('mongodb')
    .Server;

app.engine('html', cons.swig);
app.set('view engine', 'html');
app.set('views', __dirname + '/views');

var mongoclient = new MongoClient(new Server('localhost', 27017, {
    'native_parser': true
}));

var db = mongoclient.db('course');

app.get('/', function (req, res) {
    db.collection('hello_mongo_express')
        .findOne({}, function (req, res) {
            res.render('hello', doc);
        });
});

mongoclient.open(function (err, mongoclient) {
    if (err) throw err;
    app.listen(9000, function (req, res) {
        console.log('connecting 9000');
    });
});
</code></pre>