-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extendable routes, mockApi and clientOptions in storage #88
base: master
Are you sure you want to change the base?
Conversation
Hi! Looks really good. Can you add information about those features to readme? |
Ofc! Added almost the same text to the bottom of the readme. |
Great! Gonna take a closer look today and merge. |
1 similar comment
|
||
```typescript | ||
export const getChat: TExpressRoute = (app, telegramServer) => { | ||
handle(app, '/bot:token/getChat', (req, res, _next) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's handle
coming from?
I need more APIs than this library has, but there is no easy way to add new routes and store mock data for new APIs.
Mock data can be stored in an extended class, etc. But the native way seems better.
Example of expandable routes:
And custom route:
I also apretiate the ability to store exist client options to use it in mocks:
What do you think?