express.ts 379 Bytes
Newer Older
Tung Vu's avatar
Tung Vu committed
1 2 3 4 5 6 7
import {Request, Response} from "express";
import express = require("express");
import bodyParser = require("body-parser");

let router = express();
router.use(bodyParser.json());
router.use(bodyParser.urlencoded({extended: true}));
Tung Vu's avatar
Tung Vu committed
8
router.listen(8080);
Tung Vu's avatar
Tung Vu committed
9

Tung Vu's avatar
Tung Vu committed
10 11 12
console.log("Gestartet: http://localhost:8080/site/view.html");

router.use("/site",express.static(__dirname + "/Client"));