We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1597654 commit e4aa523Copy full SHA for e4aa523
JavaScript/1-HTTP/server.js
@@ -14,13 +14,13 @@ const cacheFile = (name) => {
14
try {
15
const libPath = require.resolve(filePath);
16
delete require.cache[libPath];
17
- } catch (e) {
+ } catch {
18
return;
19
}
20
21
const method = require(filePath);
22
api.set(key, method);
23
24
api.delete(key);
25
26
};
@@ -79,7 +79,7 @@ http.createServer(async (req, res) => {
79
80
const data = await fs.promises.readFile(path);
81
res.end(data);
82
- } catch (err) {
83
httpError(res, 404, 'File is not found');
84
85
0 commit comments