Compare commits
No commits in common. "95adba8e9a68bd9f89f973ff42a4762a30d90c406bf7e7f592e1bd68124eaebd" and "aa3c250c2eeebb7a9025ef76e3562e706912174bb076a9446ed5efcfd8d6f6f5" have entirely different histories.
95adba8e9a
...
aa3c250c2e
@ -1,5 +0,0 @@
|
|||||||
import { EventEmitter } from "events";
|
|
||||||
|
|
||||||
class DomainEventEmitter extends EventEmitter {}
|
|
||||||
|
|
||||||
export const domainEventEmitter = new DomainEventEmitter();
|
|
@ -1,14 +0,0 @@
|
|||||||
export const TtnMessageReceivedEventName = "TtnMessageReceived";
|
|
||||||
export type TtnMessageReceivedEvent = {
|
|
||||||
lp_ttn_end_device_uplinks_id: string;
|
|
||||||
wifis: {
|
|
||||||
mac: string;
|
|
||||||
rssi: number;
|
|
||||||
}[];
|
|
||||||
ttnGateways: {
|
|
||||||
rssi: number;
|
|
||||||
latitude: number;
|
|
||||||
longitude: number;
|
|
||||||
altitude: number;
|
|
||||||
}[];
|
|
||||||
};
|
|
@ -1,13 +0,0 @@
|
|||||||
import { domainEventEmitter } from "../config/eventEmitter";
|
|
||||||
import {
|
|
||||||
TtnMessageReceivedEvent,
|
|
||||||
TtnMessageReceivedEventName,
|
|
||||||
} from "../event/ttnMessageReceivedEvent";
|
|
||||||
|
|
||||||
domainEventEmitter.on(
|
|
||||||
TtnMessageReceivedEventName,
|
|
||||||
async (event: TtnMessageReceivedEvent) => {
|
|
||||||
console.log(event);
|
|
||||||
// TODO Hendrik 🚀
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,7 +1,6 @@
|
|||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import "./eventHandler/ttnMessageReceivedEventHandler";
|
|
||||||
const cors = require("cors");
|
const cors = require("cors");
|
||||||
|
|
||||||
import locationRoutes from "./controller/locationController";
|
import locationRoutes from "./controller/locationController";
|
||||||
|
Loading…
Reference in New Issue
Block a user