aboutsummaryrefslogtreecommitdiff
path: root/e2e-lanthan/server/handlers.js
blob: 979b4bed28de06c1cc05bf3b2b85c443568ff10a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const handleText = (body) => {
    return (req, res) => {
      res.writeHead(200, {'Content-Type': 'text/plane'});
      res.end(body);
    }
}

const handleHtml = (body) => {
    return (req, res) => {
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.end(body);
    }
}

module.exports = {
  handleText, handleHtml
}