File tree 4 files changed +42
-0
lines changed
4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ const http = require ( 'http' ) ;
2
+ const express = require ( 'express' ) ;
3
+
4
+ const hostname = '127.0.0.1' ;
5
+ const port = 3000 ;
6
+
7
+ var app = express ( ) ;
8
+ app . use ( express . static ( __dirname + '/public' ) ) ;
9
+
10
+ app . listen ( port , hostname , ( ) => {
11
+ console . log ( `Server running at http://${ hostname } :${ port } /` ) ;
12
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " hello2" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Everything is awesome." ,
5
+ "main" : " app.js" ,
6
+ "scripts" : {
7
+ "test" : " echo \" Error: no test specified\" && exit 1"
8
+ },
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" : " git+https://github.com/lucascosti/node-hello2.git"
12
+ },
13
+ "author" : " Lucas Costi" ,
14
+ "license" : " ISC" ,
15
+ "bugs" : {
16
+ "url" : " https://github.com/lucascosti/node-hello2/issues"
17
+ },
18
+ "homepage" : " https://github.com/lucascosti/node-hello2#readme"
19
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ='utf-8 '>
5
+ < title > Hello World</ title >
6
+ </ head >
7
+ < body >
8
+ < h1 > Hello world, everything is awesome!</ h1 >
9
+ < img src ="awesome.jpg " alt ="Everything is awesome! ">
10
+ </ body >
11
+ </ html >
You can’t perform that action at this time.
0 commit comments