diff --git a/src/server/server.js b/src/server/server.js index 0991f6b..bae76b2 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -1,3 +1,24 @@ -var express = require("express") -var axios = require("axios") -var schedule = require("node-schedule") \ No newline at end of file +// imports +const express = require('express'); +const http = require('http'); +const schedule = require('node-schedule'); +const axios = require('axios'); +const app = express(); + +// Shedule Format (* * * * *) (Sec(0-59), Min(0-59), Hours(0-23), Day (1-31), Month (0-11)) + + +const job = schedule.scheduleJob('*/15 * * * *', () => { + const clientURL = 'http://localhost:80'; + +axios.get(clientURL) + .then((response) => { + }) + .catch((error) => { + }); + }); + +// Port Definition +app.listen(3000, () => { + console.log('Backend-Server running on port 3000...'); +});