Skip to content

Saber2pr/ioc-route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@saber2pr/ioc-route

routes in ioc.

# from npm
npm install @saber2pr/ioc-route

# from github
git clone https://github.com/Saber2pr/-saber2pr-ioc-route.git

Feature

@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

npm install
npm start

npm 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!

Releases

No releases published

Packages

No packages published