You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
I am waiting for it, I wish it can be released today itself so, i can incorporate in my new project from initial phase itself and we don't need to update it later. :D
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
const DB = require('mongorito');
const Model = DB.Model;
const run = require('./util/run');
class User extends Model {
constructor() {
super();
this.name = String;
}
}
DB.connect("localhost:27017/settrip_db").then(function (db) {
run(function* () {
var user1 = new User({
'name': 'Rac'
});
yield user1.save();
console.log(user1.get());
yield DB.disconnect();
});
});
// result
{ created_at: 2016-09-30T09:25:46.841Z,
updated_at: 2016-09-30T09:25:46.841Z,
_id: 57ee2f9a1101e708c81b8cb7 }
I don't know why, but it was not able to save my data in db, can explain what i am doing wrong?
The text was updated successfully, but these errors were encountered: