-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
2 additions
and
28 deletions.
There are no files selected for viewing
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
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,17 +1 @@ | ||
// importiere alle benötigten Module für einen Webserver mit express | ||
// und erstelle eine neue Instanz von express | ||
// use multiple steps to create a web server with express | ||
var express = require('express'); | ||
var app = express(); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
var bodyParser = require('body-parser'); | ||
|
||
// erstelle eine neue Instanz von express | ||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: true })); | ||
app.use(express.static(path.join(__dirname, 'public'))); | ||
|
||
// erstelle einen neuen Webserver und höre auf Port 8080 | ||
app.listen(8080, function(){ | ||
console.log('Server running at http:// | ||
// importiere alle benötigten Module |