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 e4aa523 commit 31a86f5Copy full SHA for 31a86f5
JavaScript/2-WS/server.js
@@ -15,13 +15,13 @@ const cacheFile = (name) => {
15
try {
16
const libPath = require.resolve(filePath);
17
delete require.cache[libPath];
18
- } catch (e) {
+ } catch {
19
return;
20
}
21
22
const method = require(filePath);
23
api.set(key, method);
24
25
api.delete(key);
26
27
};
@@ -53,7 +53,7 @@ const server = http.createServer(async (req, res) => {
53
54
const data = await fs.promises.readFile(path);
55
res.end(data);
56
- } catch (err) {
57
res.statusCode = 404;
58
res.end('"File is not found"');
59
0 commit comments