Commit c36a9c59 authored by chrissi's avatar chrissi

sdasd

parent 2a2e687c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TypeScriptCompiler">
<option name="isCompilerEnabled" value="true" />
<option name="useConfig" value="true" />
<option name="enableServiceForProjectsWithoutConfig" value="true" />
<option name="recompileOnChanges" value="true" />
</component>
</project>
\ No newline at end of file
<h1
\ No newline at end of file
<h1>Christian Max</h1>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<h1>Christian Max</h1>
</head>
<body>
</body>
</html>
<h1>Christian Max</h1>
<p>Hallo</p>
\ No newline at end of file
......@@ -14,7 +14,32 @@ router.listen(8080, function () {
console.log(" http://localhost:8080/object");
});
router.get("/name", function (req, res) {
res.json({ vorname: "Christian", nachname: "Max" });
res.json({ vorname: "Max", nachname: "Mahr" });
});
router.use("/htmlfile", express.static(__dirname + '/name.html'));
router.get("/gauss", function (req, res) {
var a = 0;
for (var i = 1; i >= 100; i++) {
a += i;
}
res.json({ ergebnis: a });
});
router.get("/liste", function (req, res) {
var Zahlen = [];
for (var i = 1; i <= 100; i++) {
Zahlen.push(i);
}
res.json({ ergebnis: Zahlen });
});
var Person = /** @class */ (function () {
function Person(_vorname, _nachname) {
this.vorname = _vorname;
this.nachname = _nachname;
}
return Person;
}());
router.get("/object", function (req, res) {
var myObject = new Person("Max", "Mahr");
res.json(myObject);
});
router.use("/htmlfile", express.static(__dirname + "/names.html"));
//# sourceMappingURL=server.js.map
\ No newline at end of file
{"version":3,"file":"server.js","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":";;AACA,iCAAoC;AACpC,wCAA2C;AAE3C,IAAI,MAAM,GAAG,OAAO,EAAE,CAAC;AACvB,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IAClB,OAAO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AAE,GAAa;IACvD,IAAI,QAAQ,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
\ No newline at end of file
......@@ -13,9 +13,44 @@ router.listen(8080, () => {
console.log(" http://localhost:8080/liste");
console.log(" http://localhost:8080/object");
});
router.get("/name", function(req: Request, res: Response){
res.json({vorname: "Christian", nachname: "Max"});
});
router.use("/htmlfile", express.static(__dirname + '/name.html'));
router.get("/gauss", function (req:Request, res: Response){
let a: number = 0;
for (let i=1; i>=100; i++){
a += i
}
res.json({ergebnis: a});
});
router.get("/liste", function (req: Request, res: Response) {
let Zahlen: number[] = [];
router.get("/name", function(req: Request, res:Response) {
res.json({ vorname: "Christian", nachname: "Max"});
for (let i = 1; i <= 100; i++) {
Zahlen.push(i)
}
res.json({ergebnis: Zahlen});
});
router.use("/htmlfile", express.static(__dirname + "/names.html"));
class Person {
public vorname: string;
public nachname: string;
constructor(_vorname: string, _nachname: string) {
this.vorname = _vorname;
this.nachname = _nachname;
}
}
router.get("/object", function (req: Request, res: Response) {
let myObject = new Person("Christian", "Max");
res.json(myObject);
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /reset</pre>
</body>
</html>