oh I started making a chat thungy

This commit is contained in:
2024-12-23 15:29:57 +00:00
parent 7e58876b9b
commit 26436b6bc3
613 changed files with 66380 additions and 8 deletions

17
chat/node.js Normal file
View File

@@ -0,0 +1,17 @@
const express = require('express');
const app = express();
const port = 7080;
const rootPath = "/var/www/tuxcord.net/"
app.post("/chat/submit-comment", (req,res) => {
console.log("nick: ", req.body.nick);
console.log("said: ", req.body.comment);
res.redirect(302, req.get("referer"));
});
app.use(express.static(rootPath));
app.listen(port, () => {
console.log(`Server is running at
http://localhost:${port}
in directory: ${rootPath}`);
});