There was an error while loading. Please reload this page.
1 parent 07ed998 commit 114b831Copy full SHA for 114b831
1 file changed
JavaScript/1-HTTP/server.js
@@ -22,7 +22,7 @@ const cacheFile = name => {
22
const method = require(filePath);
23
api.set(key, method);
24
} catch (e) {
25
- cache.delete(name);
+ api.delete(name);
26
}
27
};
28
@@ -48,7 +48,7 @@ setTimeout(() => {
48
49
http.createServer(async (req, res) => {
50
const url = req.url === '/' ? '/index.html' : req.url;
51
- const [s, folder, file] = url.split('/');
+ const [, folder, file] = url.split('/');
52
if (folder === 'api') {
53
const method = api.get(file);
54
const body = [];
0 commit comments