Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maximilian Wagenbach
committed
Apr 22, 2015
1 parent
176ce93
commit 50d34f8
Showing
4 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<html> | ||
<head> | ||
<title>Hi!</title> | ||
</head> | ||
<body> | ||
<h1>Hello!</h1> | ||
<p>This is a .html file.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
function jsFunction() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
var port = 8080; | ||
|
||
var express = require('express'); | ||
var app = express(); | ||
app.get('/', function(req, res){ | ||
res.send('Hello World!'); | ||
|
||
app.get('/*', function(request, result){ | ||
result.sendFile(__dirname + "/public" + request._parsedUrl.path); // this is clearly a security hazard | ||
}); | ||
app.listen(8080); | ||
|
||
app.listen(port); | ||
console.log("Server running at http://127.0.0.1:" + port); |