final
This commit is contained in:
12
task18/app.js
Normal file
12
task18/app.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
|
||||
app.use('/home', function (request, response) {
|
||||
response.sendFile(__dirname + '/index.html');
|
||||
})
|
||||
|
||||
app.use('/home/foo/bar', function (request, response) {
|
||||
response.status(404).send(`Ресурс не найден`);
|
||||
});
|
||||
|
||||
app.listen(3000);
|
||||
Reference in New Issue
Block a user