Skip to content

Instantly share code, notes, and snippets.

View punit9l's full-sized avatar
:octocat:
Exploring

Puni punit9l

:octocat:
Exploring
View GitHub Profile
@punit9l
punit9l / app.js
Created May 22, 2020 15:11 — forked from stongo/app.js
Joi validation in a Mongoose model
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
var db = mongoose.connection;
db.on('error', function() {
return console.error.bind(console, 'connection error: ');
});