(path: string)
| 94 | } |
| 95 | |
| 96 | function getContentType(path: string): string { |
| 97 | switch (extname(path).toLowerCase()) { |
| 98 | case '.bin': |
| 99 | case '.ply': |
| 100 | case '.spz': |
| 101 | return 'application/octet-stream'; |
| 102 | case '.jpg': |
| 103 | case '.jpeg': |
| 104 | return 'image/jpeg'; |
| 105 | case '.png': |
| 106 | return 'image/png'; |
| 107 | default: |
| 108 | return 'application/octet-stream'; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | function sendStatus(response: ServerResponse, status: number, message: string): void { |
| 113 | response.writeHead(status, { |
no outgoing calls
no test coverage detected