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 | |
| parent | 28497b06e208cd8fd4aa94756c7a5626c18d9878 (diff) | |
| download | IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.tar.gz IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.tar.zst IRC-aa13f322e2d59fdc3c50371572c0cad443b798ec.zip | |
Version 1.0.0
| -rw-r--r-- | backend/index.ts | 10 | ||||
| -rw-r--r-- | src/modules/dummy.ts | 4 | ||||
| -rw-r--r-- | src/modules/messages.ts | 2 | ||||
| -rw-r--r-- | webpack.config.ts | 4 |
4 files changed, 8 insertions, 12 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"); }); diff --git a/src/modules/dummy.ts b/src/modules/dummy.ts deleted file mode 100644 index 103f8b7..0000000 --- a/src/modules/dummy.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default function moduleFunction(arg: string) { - console.log("From dummy component"); - return arg + " Module"; -}
\ No newline at end of file diff --git a/src/modules/messages.ts b/src/modules/messages.ts index 4a4b48a..45e9446 100644 --- a/src/modules/messages.ts +++ b/src/modules/messages.ts @@ -1,7 +1,7 @@ // import Irc from "@/index"; export default class Messages { - readonly url = "http://localhost:5000/"; + readonly url = "irc/"; sendMessage(msg: Message): void { fetch(this.url + "send", { diff --git a/webpack.config.ts b/webpack.config.ts index a516d18..0598b87 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -26,7 +26,7 @@ module.exports = { extensions: [".ts", "..."], plugins: [new TsconfigPathsPlugin()], }, - devtool:"eval-cheap-module-source-map", + // devtool:"eval-cheap-module-source-map", output: { filename: "bundle.js", path: absolutePath("dist"), @@ -34,7 +34,7 @@ module.exports = { plugins: [ new HtmlWebpackPlugin({ template: "src/index.html", - staticPath: "static", + staticPath: "irc/static", }), ], devServer: { |
