{“error”:{“code”:“MODULE_NOT_FOUND”,“requireStack”:["/Users/manavkumar/Documents/Web_Development/starting_java_script/SQL_EXPRESS_USING_JQUERY/node_modules/express/lib/view.js","/Users/manavkumar/Documents/Web_Development/starting_java_script/SQL_EXPRESS_USING_JQUERY/node_modules/express/lib/application.js","/Users/manavkumar/Documents/Web_Development/starting_java_script/SQL_EXPRESS_USING_JQUERY/node_modules/express/lib/express.js","/Users/manavkumar/Documents/Web_Development/starting_java_script/SQL_EXPRESS_USING_JQUERY/node_modules/express/index.js","/Users/manavkumar/Documents/Web_Development/starting_java_script/SQL_EXPRESS_USING_JQUERY/server.js"]}}
const route = require(‘express’).Router()
const db = require(’…/db’)
route.get(’/’,(req,res) => {
db.getAllPersons()
.then((persons) => {
res.render(‘persons’,{persons})
})
.catch((err) => {
res.send({error : err})
})
})
| Name | Age | City |
|---|---|---|
| {{person.name}} | {{person.age}} | {{person.city}} |