From 38c66af1a2416b12703b6d3c0d2f4d2fb023a0d7 Mon Sep 17 00:00:00 2001 From: 123niel Date: Thu, 10 Jan 2019 22:06:42 +0100 Subject: [PATCH] server is just simple static file server --- index.js | 13 +++---------- package.json | 8 +++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/index.js b/index.js index 5b1c39c..6520916 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,8 @@ 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('.'); \ No newline at end of file +app.listen(process.env.port || 8080, () =>{ + console.log('Clock-Server is running');} +) diff --git a/package.json b/package.json index 4697c28..fc10efe 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Hosts Global Cliffbreak Time", "main": "index.js", "scripts": { - "start": "node index.js" + "start": "node ." }, "repository": { "type": "git", @@ -13,8 +13,6 @@ "author": "Alpha, SimGie", "license": "ISC", "dependencies": { - "express": "^4.16.4", - "path": "^0.12.7" - }, - "devDependencies": {} + "express": "^4.16.4" + } }