15 lines
No EOL
331 B
JavaScript
15 lines
No EOL
331 B
JavaScript
const express = require('express');
|
|
const app = express();
|
|
const path = require('path');
|
|
const router = express.Router();
|
|
|
|
router.get('/',function(req,res){
|
|
res.sendFile(path.join(__dirname+'/page/index.html'));
|
|
});
|
|
|
|
app.use(express.static('page'));
|
|
|
|
app.use('/', router);
|
|
app.listen(process.env.port || 8080);
|
|
|
|
console.log('.'); |