Skip to content

Commit 21b34c3

Browse files
author
Lucas Costi
committed
Initial node project
1 parent f8ce548 commit 21b34c3

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

app.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
});

package.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
}

public/awesome.jpg

41.5 KB
Loading

public/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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>

0 commit comments

Comments
 (0)