repl.it
Express

No description

fork
loading
Files
  • index.js
  • css
  • js
  • chat.html
  • login.html
  • Packager files
  • package-lock.json
  • package.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var express = require('express'); 
var app = express();
var http = require('http').createServer(app);
app.use(express.static(__dirname));

app.get('/', function(req, res){ 
  res.sendFile(__dirname + '/login.html'); 
});

app.get('/chat', function(req, res){ 
  res.sendFile(__dirname + '/chat.html'); 
});

app.listen(3000, () => console.log('server started'));

//https://www.w3schools.com/css/css_form.asp
?