This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/e2e-lanthan/server/handlers.js
2019-04-04 18:43:56 +09:00

17 lines
337 B
JavaScript

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
}