text: const Koa = require('koa')
  const app = new Koa();
  
  
  const post = async (ctx)=>{
      if ( ctx.url === '/' && ctx.method === 'GET' ) {
          // 当GET请求时候返回表单页面
          let html = `
            <h1>koa2 request post demo</h1>
            <form method="POST" action="/">
              <p>userName</p>
              <input name="userName" /><br/>
              <p>nickName</p>
              <input name="nickName" /><br/>
              <p>email</p>
              <input name="email" /><br/>
              <button type="submit">submit</button>
            </form>
          `
          ctx.body = html
        }
      return
    
  
    
  }
  app.use(post)
  app.listen('3016')