summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend/index.ts10
-rw-r--r--src/modules/dummy.ts4
-rw-r--r--src/modules/messages.ts2
-rw-r--r--webpack.config.ts4
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: {