UNPKG

camintoz

Version:

Cloning ORM for database: postgres

21 lines (15 loc) 328 B
var models = require('./models'); var app = {} models.init(app); var post = new (app.models.Post); var Post = app.models.Post; post.published = true; post.title = "Test zainul"; post.content = "Content"; post.created = new Date(); post.save(function(){ console.log('hi') }) Post.find(function() { console.log('hi') })