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