Guides › Routes › Pages ← PREV NEXT →
A page handles GET requests and returns HTML.
// app/pages/home.js
module.exports = {
name: 'home',
paths: '/',
methods: 'GET',
handler: function (state) {
return '<h1>Hello world!</h1>'
}
}
Start with require('@nodedk/server')() in app.js to load routes automatically.
Next: Actions →