oh I started making a chat thungy
This commit is contained in:
17
chat/node.js
Normal file
17
chat/node.js
Normal 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}`);
|
||||
});
|
Reference in New Issue
Block a user