-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
31 lines (25 loc) · 739 Bytes
/
Copy pathapp.js
File metadata and controls
31 lines (25 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
const express = require('express');
const app = express();
const path = require("path");
const http = require('http');
const port = 3000;
const server = http.createServer(app);
const { Server } = require("socket.io");
const io = new Server(server);
require('./socket.js')(io);
app.set("views", path.join(__dirname, "views"));
app.set("view engine", "ejs");
app.use(express.static(path.join(__dirname, "public")));
app.get("/", (req, res) => {
res.render("index");
});
app.get("/chat", (req, res) => {
res.render("chat");
});
app.get("/TermsAndConditions", (req, res) => {
res.render("TermsAndConditions");
});
server.listen(port, () => {
console.log('listening on *:3000');
});