(filePath)
| 153 | } |
| 154 | |
| 155 | function getContentType(filePath) { |
| 156 | if (filePath.endsWith('.js')) return 'application/javascript; charset=utf-8'; |
| 157 | if (filePath.endsWith('.css')) return 'text/css; charset=utf-8'; |
| 158 | if (filePath.endsWith('.woff2')) return 'font/woff2'; |
| 159 | if (filePath.endsWith('.woff')) return 'font/woff'; |
| 160 | if (filePath.endsWith('.json')) return 'application/json; charset=utf-8'; |
| 161 | if (filePath.endsWith('.map')) return 'application/json; charset=utf-8'; |
| 162 | return 'application/octet-stream'; |
| 163 | } |
| 164 | |
| 165 | function tryServeStaticAsset(request, response, distDir) { |
| 166 | const requestUrl = request.url || '/'; |
no outgoing calls
no test coverage detected