-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
56 lines (54 loc) · 1.01 KB
/
server.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const http = require('http');
const server = http.createServer((req, res) => {
console.log('request received');
console.log(req.headers);
res.setHeader('Content-Type', 'text/html');
res.setHeader('X-Foo', 'bar');
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end(`
<html maaa=a >
<head>
<style>
.background {
display: flex;
width: 800px;
height: 600px;
background-color: rgb(255,255,255);
}
.test {
display: flex;
width: 500px;
height: 400px;
background-color: rgb(253,226,30);
justify-content: center;
align-items: center;
}
.demo {
display: flex;
width: 200px;
height: 100px;
justify-content: center;
background-color: rgb(25,255,255);
}
.demo2 {
display: flex;
width: 100px;
height: 200px;
background-color: rgb(255,215,255);
}
</style>
</head>
<body>
<div id="id" class="background">
<div class="test">
<div class="demo"></div>
<div class="demo2"></div>
</div>
<img id="myid"/>
<img />
</div>
</body>
</html>
`);
})
server.listen(8088);