This commit is contained in:
User1
2023-11-08 14:02:38 +03:00
parent 2123d65584
commit 2e57518d5f
118 changed files with 15715 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>О сайте</title>
<meta charset="utf-8" />
</head>
<body>
<h1>О сайте</h1>
</body>
<html></html>
</html>

View File

@@ -0,0 +1,19 @@
const http = require('http');
const fs = require('fs');
http.createServer(function (request, response) {
console.log(`Запрошенный адрес: ${request.url}`);
// получаем путь после слеша
const filePath = request.url.substr(1);
fs.readFile(filePath, function (error, data) {
if (error) {
response.statusCode = 404;
response.end('Resourse not found!');
} else {
response.end(data);
}
});
}).listen(3000, function () {
console.log('Server started at 3000');
});

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>Главная</title>
<meta charset="utf-8" />
<link
href="public/styles.css"
rel="stylesheet"
type="text/css"
/>
</head>
<body>
<h1>Главная</h1>
</body>
<html></html>
</html>

View File

@@ -0,0 +1,4 @@
body {
font-family: Verdana;
color: rgb(48, 48, 92);
}