File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -43,24 +43,24 @@ location / {
43
43
#### Native Node.js
44
44
45
45
``` js
46
- const http = require (" http" )
47
- const fs = require (" fs " )
46
+ const http = require (' http' )
47
+ const fs = require (' fs ' )
48
48
const httpPort = 80
49
49
50
50
http .createServer ((req , res ) => {
51
- fs .readFile (" index.htm" , " utf-8" , (err , content ) => {
51
+ fs .readFile (' index.htm' , ' utf-8' , (err , content ) => {
52
52
if (err) {
53
- console .log (' We cannot open " index.htm" file.' )
53
+ console .log (' We cannot open ' index .htm ' file.' )
54
54
}
55
55
56
56
res .writeHead (200 , {
57
- " Content-Type" : " text/html; charset=utf-8"
57
+ ' Content-Type' : ' text/html; charset=utf-8'
58
58
})
59
59
60
60
res .end (content)
61
61
})
62
62
}).listen (httpPort, () => {
63
- console .log (" Server listening on: http://localhost:%s" , httpPort)
63
+ console .log (' Server listening on: http://localhost:%s' , httpPort)
64
64
})
65
65
```
66
66
You can’t perform that action at this time.
0 commit comments