File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
5
"version" : " 0.2.0" ,
6
6
"configurations" : [
7
+ {
8
+ "type" : " node" ,
9
+ "request" : " launch" ,
10
+ "name" : " Launch Week 1" ,
11
+ "program" : " ${workspaceFolder}/week1/src/index.js" ,
12
+ "cwd" : " ${workspaceFolder}/week1"
13
+ },
7
14
{
8
15
"type" : " node" ,
9
16
"request" : " launch" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ const sendOtherPage = require('./responses/sendOtherPage');
8
8
const sendStyles = require ( './responses/sendStyles' ) ;
9
9
const sendText = require ( './responses/sendText' ) ;
10
10
11
+ const PORT = 3000 ;
12
+
11
13
function handleRequest ( request , response ) {
12
14
console . log ( request . method , request . url ) ;
13
15
@@ -38,6 +40,6 @@ function handleRequest(request, response) {
38
40
39
41
const server = http . createServer ( handleRequest ) ;
40
42
41
- server . listen ( 3000 , ( ) => {
42
- console . log ( ' Server started' ) ;
43
+ server . listen ( PORT , ( ) => {
44
+ console . log ( ` Server started http://localhost: ${ PORT } ` ) ;
43
45
} ) ;
You can’t perform that action at this time.
0 commit comments