Commit e8861352 authored by Kannan V M's avatar Kannan V M
Browse files

Seperate index template from user template

parent e537cb58
......@@ -26,7 +26,7 @@ app.get(['/mod_en', '/mod_ml', '/mod_hi'], (req, res) => {
});
app.get(['/en', '/ml', '/hi'], (req, res) => {
res.sendFile(path.join(__dirname, '/public/index.html'));
res.sendFile(path.join(__dirname, '/public/user.html'));
});
const userNamespace = io.of('/user');
......@@ -105,7 +105,6 @@ modNamespace.on('connection', (socket) => {
modNamespace.to(roomId).emit('leaves data', leavesData[roomId]);
socket.on('allow user', (socketId) => {
console.log(socketId);
userNamespace.to(socketId).emit('enter knowledge');
});
socket.on('leaf delete', (socketId) => {
......
......@@ -6,8 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Knowledge Tree - Free Software Camp</title>
<link rel="stylesheet" href="style.css">
<script src="socket.io.min.js"></script>
<script src="user.js"></script>
</head>
<body>
......@@ -325,13 +323,6 @@
<path d="m 398.322,407.792 13.026,1.491 14.178,-2.073 14.595,2.975 -13.631,-8.303 -9.18,3.412 z" style="fill:#3c3c3c" id="path401" />
</g>
</svg>
<div id="input-fields">
<form id="user-form">
<input id="user-name" placeholder="Enter your name" type="text" maxlength="50">
<input id="user-submit" type="submit" value="Submit" onclick="event.preventDefault(); registerUser();">
</form>
</div>
<div id="knowledge"></div>
<div id="close-button">
<button onclick="closeLeaf()">Close</button>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment