Commit be17b1f3 authored by Tung Vu's avatar Tung Vu

uebung2einfuegen

parent 32d0e1ba
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ueabung2_vorlage.iml" filepath="$PROJECT_DIR$/.idea/ueabung2_vorlage.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TypeScriptCompiler">
<option name="isCompilerEnabled" value="true" />
<option name="useConfig" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="E:/Studium/Social Media Systems/WEBP2/webP2-SS18-Mahr-Max-Vu" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="true">
<option name="arguments" value="$FilePathRelativeToProjectRoot$ --out-dir dist --source-maps --presets env" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="js" />
<option name="immediateSync" value="true" />
<option name="name" value="Babel" />
<option name="output" value="dist\$FileDirRelativeToProjectRoot$\$FileNameWithoutExtension$.js:dist\$FileDirRelativeToProjectRoot$\$FileNameWithoutExtension$.js.map" />
<option name="outputFilters">
<array />
</option>
<option name="outputFromStdout" value="false" />
<option name="program" value="" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="false" />
<option name="workingDir" value="$ContentRoot$" />
<envs />
</TaskOptions>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
"use strict";
exports.__esModule = true;
var express = require("express");
var bodyParser = require("body-parser");
var router = express();
router.use(bodyParser.json());
router.use(bodyParser.urlencoded({ extended: true }));
router.listen(8080, function () {
console.log("Gestartet: http://localhost:8080/raten/5");
});
//# sourceMappingURL=express.js.map
\ No newline at end of file
{"version":3,"file":"express.js","sourceRoot":"","sources":["express.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,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC"}
\ No newline at end of file
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}));
router.listen(8080, () => {
console.log("Gestartet: http://localhost:8080/raten/5");
});
#!/usr/bin/env node
var mime = require('./mime.js');
var file = process.argv[2];
var type = mime.lookup(file);
process.stdout.write(type + '\n');
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
# Installation
> `npm install --save @types/body-parser`
# Summary
This package contains type definitions for body-parser (https://github.com/expressjs/body-parser).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser
Additional Details
* Last updated: Wed, 08 Nov 2017 22:15:33 GMT
* Dependencies: express, node
* Global values: none
# Credits
These definitions were written by Santi Albo <https://github.com/santialbo>, Vilic Vane <https://github.com/vilic>, Jonathan Häberle <https://github.com/dreampulse>, Gevik Babakhani <https://github.com/blendsdk>, Tomasz Łaziuk <https://github.com/tlaziuk>.
// Type definitions for body-parser 1.16
// Project: https://github.com/expressjs/body-parser
// Definitions by: Santi Albo <https://github.com/santialbo>, Vilic Vane <https://github.com/vilic>, Jonathan Häberle <https://github.com/dreampulse>, Gevik Babakhani <https://github.com/blendsdk>, Tomasz Łaziuk <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import { Request, RequestHandler, Response } from 'express';
// for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser
// @deprecated
declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler;
declare namespace bodyParser {
interface Options {
inflate?: boolean;
limit?: number | string;
type?: string | string[] | ((req: Request) => any);
verify?(req: Request, res: Response, buf: Buffer, encoding: string): void;
}
interface OptionsJson extends Options {
reviver?(key: string, value: any): any;
strict?: boolean;
}
interface OptionsText extends Options {
defaultCharset?: string;
}
interface OptionsUrlencoded extends Options {
extended?: boolean;
parameterLimit?: number;
}
function json(options?: OptionsJson): RequestHandler;
function raw(options?: Options): RequestHandler;
function text(options?: OptionsText): RequestHandler;
function urlencoded(options?: OptionsUrlencoded): RequestHandler;
}
export = bodyParser;
{
"_args": [
[
{
"raw": "@types/body-parser@*",
"scope": "@types",
"escapedName": "@types%2fbody-parser",
"name": "@types/body-parser",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"/Users/samuel/Dropbox/Webbasierte Programmierung (IT1000)/SS18/WebP2/Uebungen/ubung2/uebung2_loesung/node_modules/@types/express"
]
],
"_from": "@types/body-parser@*",
"_id": "@types/body-parser@1.16.8",
"_inCache": true,
"_location": "/@types/body-parser",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/body-parser-1.16.8.tgz_1510179404744_0.4493043173570186"
},
"_npmUser": {
"name": "types",
"email": "ts-npm-types@microsoft.com"
},
"_phantomChildren": {},
"_requested": {
"raw": "@types/body-parser@*",
"scope": "@types",
"escapedName": "@types%2fbody-parser",
"name": "@types/body-parser",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@types/express"
],
"_resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz",
"_shasum": "687ec34140624a3bec2b1a8ea9268478ae8f3be3",
"_shrinkwrap": null,
"_spec": "@types/body-parser@*",
"_where": "/Users/samuel/Dropbox/Webbasierte Programmierung (IT1000)/SS18/WebP2/Uebungen/ubung2/uebung2_loesung/node_modules/@types/express",
"contributors": [
{
"name": "Santi Albo",
"url": "https://github.com/santialbo"
},
{
"name": "Vilic Vane",
"url": "https://github.com/vilic"
},
{
"name": "Jonathan Häberle",
"url": "https://github.com/dreampulse"
},
{
"name": "Gevik Babakhani",
"url": "https://github.com/blendsdk"
},
{
"name": "Tomasz Łaziuk",
"url": "https://github.com/tlaziuk"
}
],
"dependencies": {
"@types/express": "*",
"@types/node": "*"
},
"description": "TypeScript definitions for body-parser",
"devDependencies": {},
"directories": {},
"dist": {
"integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==",
"shasum": "687ec34140624a3bec2b1a8ea9268478ae8f3be3",
"tarball": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz"
},
"license": "MIT",
"main": "",
"maintainers": [
{
"name": "types",
"email": "ts-npm-types@microsoft.com"
}
],
"name": "@types/body-parser",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.2",
"typesPublisherContentHash": "e6976d18d37cd52405268dffcc70ad439e26bfb564395f871130687a24d073fa",
"version": "1.16.8"
}
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
# Installation
> `npm install --save @types/events`
# Summary
This package contains type definitions for events (https://github.com/Gozala/events).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/events
Additional Details
* Last updated: Mon, 26 Feb 2018 20:02:51 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Yasunori Ohoka <https://github.com/yasupeke>.
// Type definitions for events 1.2
// Project: https://github.com/Gozala/events
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type Listener = (...args: any[]) => void;
export class EventEmitter {
static listenerCount(emitter: EventEmitter, type: string | number): number;
static defaultMaxListeners: number;
setMaxListeners(n: number): this;
emit(type: string | number, ...args: any[]): boolean;
addListener(type: string | number, listener: Listener): this;
on(type: string | number, listener: Listener): this;
once(type: string | number, listener: Listener): this;
removeListener(type: string | number, listener: Listener): this;
removeAllListeners(type?: string | number): this;
listeners(type: string | number): Listener[];
listenerCount(type: string | number): number;
}
{
"_args": [
[
{
"raw": "@types/events@*",
"scope": "@types",
"escapedName": "@types%2fevents",
"name": "@types/events",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"/Users/samuel/Dropbox/Webbasierte Programmierung (IT1000)/SS18/WebP2/Uebungen/ubung2/uebung2_loesung/node_modules/@types/express-serve-static-core"
]
],
"_from": "@types/events@*",
"_id": "@types/events@1.2.0",
"_inCache": true,
"_location": "/@types/events",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/events_1.2.0_1519675393227_0.8009902172945162"
},
"_npmUser": {
"name": "types",
"email": "ts-npm-types@microsoft.com"
},
"_phantomChildren": {},
"_requested": {
"raw": "@types/events@*",
"scope": "@types",
"escapedName": "@types%2fevents",
"name": "@types/events",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@types/express-serve-static-core"
],
"_resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
"_shasum": "81a6731ce4df43619e5c8c945383b3e62a89ea86",
"_shrinkwrap": null,
"_spec": "@types/events@*",
"_where": "/Users/samuel/Dropbox/Webbasierte Programmierung (IT1000)/SS18/WebP2/Uebungen/ubung2/uebung2_loesung/node_modules/@types/express-serve-static-core",
"contributors": [
{
"name": "Yasunori Ohoka",
"url": "https://github.com/yasupeke"
}
],
"dependencies": {},
"description": "TypeScript definitions for events",
"devDependencies": {},
"directories": {},
"dist": {
"integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
"shasum": "81a6731ce4df43619e5c8c945383b3e62a89ea86",
"tarball": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
"fileCount": 4,
"unpackedSize": 3167
},
"license": "MIT",
"main": "",
"maintainers": [
{
"name": "types",
"email": "ts-npm-types@microsoft.com"
}
],
"name": "@types/events",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "77df50634244c91df37e85c9c99789b6c252e985898e5c35471b3a6e0f156288",
"version": "1.2.0"
}
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
# Installation
> `npm install --save @types/express-serve-static-core`
# Summary
This package contains type definitions for Express (http://expressjs.com).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core
Additional Details
* Last updated: Fri, 19 Jan 2018 22:53:49 GMT
* Dependencies: http, events, node
* Global values: none
# Credits
These definitions were written by Boris Yankov <https://github.com/borisyankov>, Michał Lytek <https://github.com/19majkel94>, Kacper Polak <https://github.com/kacepe>, Satana Charuwichitratana <https://github.com/micksatana>, Sami Jaber <https://github.com/samijaber>.
{
"_args": [
[
{
"raw": "@types/express-serve-static-core@*",
"scope": "@types",
"escapedName": "@types%2fexpress-serve-static-core",
"name": "@types/express-serve-static-core",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"/Users/samuel/Dropbox/Webbasierte Programmierung (IT1000)/SS18/WebP2/Uebungen/ubung2/uebung2_loesung/node_modules/@types/express"
]
],
"_from": "@types/express-serve-static-core@*",
"_id": "@types/express-serve-static-core@4.11.1",
"_inCache": true,
"_location": "/@types/express-serve-static-core",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/express-serve-static-core-4.11.1.tgz_1516402442416_0.4394925069063902"
},
"_npmUser": {
"name": "types",
"email": "ts-npm-types@microsoft.com"
},
"_phantomChildren": {},
"_requested": {
"raw": "@types/express-serve-static-core@*",
"scope": "@types",
"escapedName": "@types%2fexpress-serve-static-core",
"name": "@types/express-serve-static-core",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@types/express",
"/@types/serve-static"
],
"_resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz",
"_shasum": "f6f7212382d59b19d696677bcaa48a37280f5d45",