suka izi
This commit is contained in:
11 files changed
+1228
-159
No files matched your search
@@ -0,0 +1,17 @@
|
||||
const express = require("express");
|
||||
const path = require("path");
|
||||
const port = 8000;
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use("/static", express.static(path.join(__dirname, "/public")));
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.set('Content-Type', 'text/html');
|
||||
res.sendFile(path.join(__dirname, '/views/index.html'));
|
||||
return res.status(200);
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Example app listening on port ${port}`)
|
||||
});
|
||||
Reference in new issue
Block a user