diff options
| author | Maks Jopek <maksymilian.jopek@prym-soft.pl> | 2021-05-26 08:47:29 +0200 |
|---|---|---|
| committer | Maks Jopek <maksymilian.jopek@prym-soft.pl> | 2021-05-26 08:47:29 +0200 |
| commit | aa13f322e2d59fdc3c50371572c0cad443b798ec (patch) | |
| tree | 3b3f735f3f49d778366f5ee0f2b00a3c0159a3f5 /backend | |
| parent | 28497b06e208cd8fd4aa94756c7a5626c18d9878 (diff) | |
| download | IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.tar.gz IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.tar.zst IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.zip | |
Version 1.0.0
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/index.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/index.ts b/backend/index.ts index 724be05..851b84e 100644 --- a/backend/index.ts +++ b/backend/index.ts @@ -1,18 +1,18 @@ import express from "express"; -import cors from "cors"; +// import cors from "cors"; const app = express(); -const PORT = 5000; +const PORT = 8001; app.use(express.json()); -app.use(cors()); +// app.use(cors()); app.use("/", express.static("../dist")); const longpoll = require("express-longpoll")(app); -longpoll.create("/poll", cors()); +longpoll.create("/poll"/* , cors() */); app.post("/send", (req, res) => { - console.log(req.body); + // console.log(req.body); longpoll.publish("/poll", req.body) res.send("OK"); }); |
