Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
yvanwangl committed Nov 10, 2017
1 parent ba5ee66 commit 098be52
Show file tree
Hide file tree
Showing 36 changed files with 248 additions and 47 deletions.
4 changes: 3 additions & 1 deletion .gitignore
@@ -1 +1,3 @@
/node_modules
/node_modules
/examples/express-example/node_modules
/examples/koa-example/node_modules
18 changes: 18 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,18 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Current TS File",
"type": "node",
"request": "launch",
"args": ["${relativeFile}"],
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"protocol": "inspector"
}
]
}
2 changes: 1 addition & 1 deletion build/cmjs/decorators/path.d.ts
@@ -1,4 +1,4 @@
export declare const rootPathSymbolKey: symbol;
export declare const pathSymbolKey: symbol;
export declare const methodsSymbolKey: symbol;
export declare const path: (path: string) => Function;
export declare const Path: (path: string) => Function;
2 changes: 1 addition & 1 deletion build/cmjs/decorators/path.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/cmjs/engines/expressEngine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/cmjs/engines/expressEngine.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/cmjs/engines/koaEngine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/cmjs/engines/koaEngine.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions build/cmjs/index.d.ts
@@ -1,5 +1,8 @@
import 'reflect-metadata';
import Options from './types/winter-options';
import { Path } from './decorators/path';
import { GET, POST, PUT, DELETE } from './decorators/http-method';
export { Path, GET, POST, PUT, DELETE };
export default class Winter {
constructor(options: Options);
}
7 changes: 7 additions & 0 deletions build/cmjs/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/cmjs/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/decorators/path.d.ts
@@ -1,4 +1,4 @@
export declare const rootPathSymbolKey: symbol;
export declare const pathSymbolKey: symbol;
export declare const methodsSymbolKey: symbol;
export declare const path: (path: string) => Function;
export declare const Path: (path: string) => Function;
2 changes: 1 addition & 1 deletion build/es6/decorators/path.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/engines/expressEngine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/engines/expressEngine.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/engines/koaEngine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/engines/koaEngine.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions build/es6/index.d.ts
@@ -1,5 +1,8 @@
import 'reflect-metadata';
import Options from './types/winter-options';
import { Path } from './decorators/path';
import { GET, POST, PUT, DELETE } from './decorators/http-method';
export { Path, GET, POST, PUT, DELETE };
export default class Winter {
constructor(options: Options);
}
3 changes: 3 additions & 0 deletions build/es6/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/es6/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions examples/express-example/package.json
@@ -0,0 +1,17 @@
{
"name": "express-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/express": "^4.0.39",
"body-parser": "^1.18.2",
"express": "^4.16.2"
}
}

0 comments on commit 098be52

Please sign in to comment.