forked from Cliffbreak/Time-Service
server is just simple static file server
This commit is contained in:
parent
a8ebe88730
commit
38c66af1a2
2 changed files with 6 additions and 15 deletions
13
index.js
13
index.js
|
@ -1,15 +1,8 @@
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const app = 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(express.static('page'));
|
||||||
|
|
||||||
app.use('/', router);
|
app.listen(process.env.port || 8080, () =>{
|
||||||
app.listen(process.env.port || 8080);
|
console.log('Clock-Server is running');}
|
||||||
|
)
|
||||||
console.log('.');
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Hosts Global Cliffbreak Time",
|
"description": "Hosts Global Cliffbreak Time",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js"
|
"start": "node ."
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
"author": "Alpha, SimGie",
|
"author": "Alpha, SimGie",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.16.4",
|
"express": "^4.16.4"
|
||||||
"path": "^0.12.7"
|
}
|
||||||
},
|
|
||||||
"devDependencies": {}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue