Code files

This commit is contained in:
Akhil
2017-07-31 11:33:31 +05:30
parent 073a63ebdd
commit b9ae409ec0
801 changed files with 17535 additions and 0 deletions
@@ -0,0 +1,22 @@
'use strict'
const router = require('koa-router')()
router.get('/', async function (ctx, next) {
await next()
const { title } = ctx.state
ctx.body = `
<html>
<head>
<title> ${title} </title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1> ${title} </h1>
<p> Welcome to ${title} </p>
</body>
</html>
`
}, async (ctx) => ctx.state = {title: 'Koa'})
module.exports = router