routes in ioc.
# from npm
npm install @saber2pr/ioc-route
# from github
git clone https://github.com/Saber2pr/-saber2pr-ioc-route.git
@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
npm install
npm start
npm test
Author: saber2pr
you should write ts in /src
you should make test in /src/test
export your core in /src/index.ts!