webpage
This commit is contained in:
16
run.js
16
run.js
@@ -1,14 +1,18 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const app = express();
|
||||
const port = 8080;
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'webpage/public')));
|
||||
// app.use(express.static(path.join(__dirname, 'webpage/public')));
|
||||
|
||||
app.get('/', async(req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'public', 'index.html'));
|
||||
// app.get('/', async(req, res) => {
|
||||
//// res.sendFile(path.join(__dirname, 'webpage/public', 'index.html'));
|
||||
// res.sendFile(path.join(__dirname, 'webpage/public', 'index.html'));
|
||||
});
|
||||
// });
|
||||
|
||||
app.listen(80, () => {
|
||||
console.log("Server successfully running on port 8080");
|
||||
app.use(express.static(path.join(__dirname, "webpage/public")));
|
||||
// app.use("/posts", express.static(path.join(__dirname, "webpage/content/posts")))
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server successfully running on port ${port}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user