Skip to content

Instantly share code, notes, and snippets.

@fengmk2 fengmk2/router.json
Last active Nov 24, 2017

Embed
What would you like to do?
egg router json
[
{
"name": "home",
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/",
"regexp": "/^(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/home.js"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/hello",
"regexp": "/^\\/hello(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/hello.js"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/logger",
"regexp": "/^\\/logger(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/logger.js"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/protocol",
"regexp": "/^\\/protocol(?:\\/(?=$))?$/",
"stack": [
"anonymous"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/user.json",
"regexp": "/^\\/user\\.json(?:\\/(?=$))?$/",
"stack": [
"jsonp",
"anonymous"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/ip",
"regexp": "/^\\/ip(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/ip.js"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/class-controller",
"regexp": "/^\\/class-controller(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/foo.js#Foo.bar()"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/obj-controller",
"regexp": "/^\\/obj-controller(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/obj.js#bar()"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/subobj-controller",
"regexp": "/^\\/subobj-controller(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/obj.js#subObj.hello()"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/obj2-controller",
"regexp": "/^\\/obj2-controller(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/obj2.js#bar()"
]
},
{
"name": null,
"methods": [
"HEAD",
"GET"
],
"paramNames": [],
"path": "/subobj2-controller",
"regexp": "/^\\/subobj2-controller(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/obj2.js#subObj.hello()"
]
},
{
"name": null,
"methods": [
"HEAD",
"ACL",
"BIND",
"CHECKOUT",
"CONNECT",
"COPY",
"DELETE",
"GET",
"HEAD",
"LINK",
"LOCK",
"M-SEARCH",
"MERGE",
"MKACTIVITY",
"MKCALENDAR",
"MKCOL",
"MOVE",
"NOTIFY",
"OPTIONS",
"PATCH",
"POST",
"PROPFIND",
"PROPPATCH",
"PURGE",
"PUT",
"REBIND",
"REPORT",
"SEARCH",
"SUBSCRIBE",
"TRACE",
"UNBIND",
"UNLINK",
"UNLOCK",
"UNSUBSCRIBE"
],
"paramNames": [],
"path": "/all",
"regexp": "/^\\/all(?:\\/(?=$))?$/",
"stack": [
"/Users/mk2/git/github.com/eggjs/egg/test/fixtures/apps/demo/app/controller/home.js"
]
}
]
@atian25

This comment has been minimized.

Copy link

atian25 commented Nov 24, 2017

stack 的 example 可以更新下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.