Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saber2pr/ioc-route
> routes in ioc.
https://github.com/saber2pr/ioc-route
ioc reflect-metadata router
Last synced: 8 days ago
JSON representation
> routes in ioc.
- Host: GitHub
- URL: https://github.com/saber2pr/ioc-route
- Owner: Saber2pr
- Created: 2019-05-17T11:06:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T11:25:52.000Z (over 5 years ago)
- Last Synced: 2024-11-09T00:32:04.366Z (2 months ago)
- Topics: ioc, reflect-metadata, router
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @saber2pr/ioc-route
> routes in ioc.
```bash
# from npm
npm install @saber2pr/ioc-route# from github
git clone https://github.com/Saber2pr/-saber2pr-ioc-route.git
```# Feature
```ts
@BaseUrl('/api')
class App {
@Route('/home')
home() {
return 'home'
}@Route('/about')
about() {
return 'about'
}
}const data = parser(App)
console.log(transformer(data, '/api/home')) // home
console.log(transformer(data, '/api/about')) // about
```---
## start
```bash
npm install
``````bash
npm startnpm test
```> Author: saber2pr
---
## develope and test
> you should write ts in /src
> you should make test in /src/test
> export your core in /src/index.ts!