Skip to content

Instantly share code, notes, and snippets.

@aldidas
Created February 22, 2016 08:02
Show Gist options
  • Save aldidas/304353410d9b0c0c8807 to your computer and use it in GitHub Desktop.
Save aldidas/304353410d9b0c0c8807 to your computer and use it in GitHub Desktop.
model.js express.js app
var Sequelize = require('sequelize'),
c = require('./conf');
var Post = c.config.db.define( 'post', {
postTitle: {
type: Sequelize.STRING,
field: 'post_title'
},
postContent: {
type: Sequelize.TEXT,
field: 'post_content'
}
} , {
timestamps: true
});
exports.models = {
post: Post
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment