Commit d316245d authored by chrissi's avatar chrissi

test

parent 0c176ed1
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
<?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="enableServiceForProjectsWithoutConfig" value="true" />
<option name="recompileOnChanges" 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="ChangeListManager">
<list default="true" id="9430695a-564a-451d-a8ae-c9cb9a8398a1" name="Default" comment="" />
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
<file leaf-file-name="express.ts" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/express.ts">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="231">
<caret line="13" column="36" lean-forward="true" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="requests.http" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/requests.http">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
<caret line="32" column="30" lean-forward="false" selection-start-line="32" selection-start-column="30" selection-end-line="32" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/requests.http" />
<option value="$PROJECT_DIR$/express.ts" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds" extendedState="1">
<option name="width" value="1920" />
<option name="height" value="1057" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="ueabung2_vorlage" type="b2602c69:ProjectViewProjectNode" />
<item name="ueabung2_vorlage" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="node.js.detected.package.prettier" value="true" />
<property name="node.js.path.for.package.prettier" value="project" />
<property name="node.js.selected.package.prettier" value="" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="/usr/local/bin/node" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path" value="C:/Program Files/nodejs/node" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="Starten" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" path-to-js-file="express.js" working-dir="$PROJECT_DIR$" />
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9430695a-564a-451d-a8ae-c9cb9a8398a1" name="Default" comment="" />
<created>1523885421443</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1523885421443</updated>
<workItem from="1523885423499" duration="139000" />
<workItem from="1524044385463" duration="694000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="833000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1920" height="1057" extended-state="1" />
<editor active="true" />
<layout>
<window_info id="TypeScript" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32908458" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32908458" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
<option name="exactExcludedFiles">
<list>
<option value="$PROJECT_DIR$/express.js" />
<option value="$PROJECT_DIR$/express.js.map" />
</list>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/express.ts">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="6" column="16" lean-forward="true" selection-start-line="6" selection-start-column="16" selection-end-line="6" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requests.http">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="168">
<caret line="8" column="31" lean-forward="true" selection-start-line="8" selection-start-column="31" selection-end-line="8" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requests.http">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
<caret line="32" column="30" lean-forward="false" selection-start-line="32" selection-start-column="30" selection-end-line="32" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/express.ts">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="231">
<caret line="13" column="36" lean-forward="true" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
"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");
});
router.get("/user/:id", function(req: Request, res:Response) {
let identifier = req.params["id"];
res.json({zahl: identifier});
});
router.post("article", function(req: Request, res:Response) {
let name = req.body["title"];
res.json({title: name});
});
\ No newline at end of file
#!/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