fedfbd9d5c
* First basic API support * Change require functionality * Change 501 to 404 * Change wording * Fix test
6 lines
168 B
JavaScript
6 lines
168 B
JavaScript
export default (req, res) => {
|
|
res.writeHead(200, { 'Content-Type': 'application/json' })
|
|
|
|
const json = JSON.stringify([{ title: 'Cool Post!' }])
|
|
res.end(json)
|
|
}
|