09 - Fetch From One
Server Addition
/************************
* GET: /one
***********************/
router.get('/one', function(req, res) {
TestModel
.findAll({ //1
attributes: ['id', 'testdata']
})
.then(
function findAllSuccess(data) {
console.log("Controller data:", data);
res.json(data);
},
function findAllError(err) {
res.send(500, err.message);
}
);
});Analysis
Overview
Summary
Quick Summary for the DOM Work
Test
Last updated