FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TypeScriptSamples/node/HttpServer.ts at master · africhild/TypeScriptSamples · GitHub
africhild
/
TypeScriptSamples
Public
forked from
microsoft/TypeScriptSamples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
TypeScriptSamples
/
node
/
HttpServer.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
9 lines (7 loc) · 278 Bytes
Breadcrumbs
TypeScriptSamples
/
node
/
HttpServer.ts
Copy path
File metadata and controls
9 lines (7 loc) · 278 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
///<reference path='node.d.ts'/>
import
http
=
require
(
"http"
)
;
http
.
createServer
(
function
(
req
,
res
)
{
res
.
writeHead
(
200
,
{
'Content-Type'
:
'text/plain'
}
)
;
res
.
end
(
'Hello World\n'
)
;
}
)
.
listen
(
1337
,
'127.0.0.1'
)
;
console
.
log
(
'Server running at http://127.0.0.1:1337/'
)
;
Back
|
FazBrowse Home
|
New Git URL