Add messaging
This commit is contained in:
parent
23128f25e1
commit
5733975aa0
29 changed files with 986 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import Fastify from "fastify";
|
||||
import cors from "@fastify/cors";
|
||||
import cookie from "@fastify/cookie";
|
||||
import websocket from "@fastify/websocket";
|
||||
|
||||
import { config } from "./config.js";
|
||||
|
||||
|
|
@ -14,6 +15,8 @@ import { communityRoutes } from "./controllers/community/routes.js";
|
|||
import { channelRoutes } from "./controllers/channel/routes.js";
|
||||
import { roleRoutes } from "./controllers/role/routes.js";
|
||||
import { inviteRoutes } from "./controllers/invite/routes.js";
|
||||
import { messageRoutes } from "./controllers/message/routes.js";
|
||||
import { websocketRoutes } from "./controllers/websocket/routes.js";
|
||||
|
||||
const app = Fastify({
|
||||
logger: true,
|
||||
|
|
@ -26,6 +29,8 @@ app.register(cors, {
|
|||
|
||||
app.register(cookie, { secret: getCookieSecret() });
|
||||
|
||||
app.register(websocket);
|
||||
|
||||
app.register(testRoutes);
|
||||
app.register(authRoutes, { prefix: "/api/v1/auth" });
|
||||
app.register(userRoutes, { prefix: "/api/v1/user" });
|
||||
|
|
@ -34,6 +39,8 @@ app.register(communityRoutes, { prefix: "/api/v1/community" });
|
|||
app.register(channelRoutes, { prefix: "/api/v1/channel" });
|
||||
app.register(roleRoutes, { prefix: "/api/v1/role" });
|
||||
app.register(inviteRoutes, { prefix: "/api/v1/invite" });
|
||||
app.register(messageRoutes, { prefix: "/api/v1/message" });
|
||||
app.register(websocketRoutes, { prefix: "/ws" });
|
||||
|
||||
app.listen({ port: config.port }, (err, address) => {
|
||||
if (err) throw err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue