22 - python & all web labs
This commit is contained in:
22
labWeb/lab7/index.js
Normal file
22
labWeb/lab7/index.js
Normal 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");
|
||||
});
|
||||
Reference in New Issue
Block a user