refactor: rabbitmq implement
This commit is contained in:
parent
24350a11a4
commit
3fc70daed0
12 changed files with 676 additions and 545 deletions
|
|
@ -5,8 +5,10 @@ import cors from "cors";
|
|||
|
||||
import { RegisterRoutes } from "./routes";
|
||||
import errorHandler from "./middlewares/exception";
|
||||
import rabbitmq from "./rabbitmq";
|
||||
|
||||
import swaggerSpecs from "./swagger.json";
|
||||
import { handler as amqHandler } from "./rabbitmq/handler";
|
||||
|
||||
const PORT = +(process.env.PORT || 80);
|
||||
|
||||
|
|
@ -28,3 +30,5 @@ app.use(errorHandler);
|
|||
app.listen(PORT, "0.0.0.0", () =>
|
||||
console.log(`Application is running on http://localhost:${PORT}`),
|
||||
);
|
||||
|
||||
rabbitmq.init(amqHandler).catch((e) => console.error(e));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue