(path: string, content: string, mimeType: string)
| 87 | } |
| 88 | |
| 89 | setContent(path: string, content: string, mimeType: string) { |
| 90 | this.route(path, (req, res) => { |
| 91 | res.writeHead(200, { 'Content-Type': mimeType }); |
| 92 | res.end(mimeType === 'text/html' ? `<!DOCTYPE html>${content}` : content); |
| 93 | }); |
| 94 | } |
| 95 | |
| 96 | redirect(from: string, to: string) { |
| 97 | this.route(from, (req, res) => { |
no test coverage detected