-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
31 lines (28 loc) · 1.07 KB
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// import {Subscriber} from "./src/subscriber.mjs";
var express = require("express");
// import express from "express"
var app = express();
// import http from "http";
// const server = http.createServer(app);
var http = require("http").createServer(app);
// var io = require("socket.io")(http);
// var kafka = require("kafka-node");
// const Subscriber = require("./src/monitorSubscriber.js")
const ConsumerManager = require("./src/consumerManager.js")
// var protobuf = require("protobufjs");
//var aggregateEvent = require("./src/protos/models/events/Aggregate_pb")
// import { fileURLToPath } from "url";
// import { dirname} from "path";
// const __filename = fileURLToPath(import.meta.url);
// const __dirname = dirname(__filename);
var Chart = require('chart.js');
// var joint = require('jointjs');
app.get("/", (req, res) => {
res.sendFile(__dirname + "/index.html");
});
app.use(express.static(__dirname + "/src"));
app.use("/node_modules", express.static(__dirname + "/node_modules"));
ConsumerManager.ini(http);
http.listen(3000, () => {
console.log("listening on *:3000");
});