22 - python & all web labs

This commit is contained in:
2026-05-02 20:27:02 +05:00
parent ef77f101fa
commit 19af922baf
5781 changed files with 770492 additions and 96 deletions

22
labWeb/lab7/index.js Normal file
View File

@@ -0,0 +1,22 @@
let express = require(`express`);
const app = express();
const port = 3000;
app.listen(port, function () {
console.log(`http://localhost:${port}`);
});
app.use(express.static(`public`));
const hbs = require(`hbs`);
app.set(`views`, `views`);
app.set(`view engine`, `hbs`);
console.log(4*32*1000*2*60*32/2**23);
app.get("/", function (req, res) {
res.render("main");
});
app.get("/hf", function (req, res) {
res.render("head_and_footer");
});