# Nodejs SQL ORM Sequelize 입문 3. 생성(Create)

const models = require('./../models')
var router = express.Router()

router.post('/', (req, res)=>{
  models.Post.build({
    title: req.body.title,
    content: req.body.content
  }).save().then(()=>{
    res.json("build ok!")
  })
})
1
2
3
4
5
6
7
8
9
10
11