-
Notifications
You must be signed in to change notification settings - Fork 81
/
message-handlers.ts
25 lines (23 loc) · 1.02 KB
/
message-handlers.ts
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
import hostnameAssigned from "./src/message-handlers/hostname-assigned.js";
import forwardedRequest from "./src/message-handlers/forwarded-request.js";
import hostnameAlreadyTaken from "./src/message-handlers/hostname-already-taken.js";
import invalidSubscription from "./src/message-handlers/invalid-subscription.js";
import domainAlreadyReserved from "./src/message-handlers/domain-already-reserved.js";
import domainReservationError from "./src/message-handlers/domain-reservation-error.js";
import tooManyDomains from "./src/message-handlers/too-many-domains.js";
import clientMessage from "./src/message-handlers/client-message.js";
/**
* Websocket message handlers for different message types
* Like app.ts for express, but with handlers for different message types instead of URLs
*/
const messageHandlers = {
hostnameAssigned,
forwardedRequest,
hostnameAlreadyTaken,
invalidSubscription,
domainAlreadyReserved,
domainReservationError,
tooManyDomains,
clientMessage,
}
export { messageHandlers };