Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

[question] Support for async/await #1

Open
afgallo opened this issue Jun 16, 2018 · 3 comments
Open

[question] Support for async/await #1

afgallo opened this issue Jun 16, 2018 · 3 comments
Labels

Comments

@afgallo
Copy link

afgallo commented Jun 16, 2018

Hi there,

Thanks for this library, really like what you've done @tommelo 👍

I was wondering whether you've worked on a version that supports async/await? If not, do you think the changes would be around making execute and before async?

class AbstractRequestHandler {

Thanks,
Andre

@tommelo
Copy link
Member

tommelo commented Jun 16, 2018

Hey @afgallo,
thanks, I appreciate that!

Actually, this lib needs a huge refactor, everything was done with a tight deadline at the company.
I'll look forward to make some improvements(including async/await).

If you have any other suggestion or If you want to contribute with code, design, tests and etc, just let me know, that would be great!

@afgallo
Copy link
Author

afgallo commented Jun 16, 2018

When you say huge refactor do you mean a complete re-write? If you could list out some items that are in your head we can maybe come up with a little roadmap of improvements 😉

@tommelo
Copy link
Member

tommelo commented Jun 18, 2018

Yes, a complete re-write!
I guess we could start trying to figure out a better design for the following features:

  • Global Exception Handling;
  • Request Serialization based on HTTP Header "Accept" (XML and JSON);
  • Request Deserialization based on HTTP Header "Content-Type"(x-www-form-url-encoded, application/json and etc);
  • Built in Request Validation(Joi or somenthing else).
  • Request Route? (for example, if the user wants to handle the methods GET, POST, PUT, DELETE for the endpoint /users using just one Lambda Function).

Then, when we get this done, it would be great to have a cli tool to create project "boilerplates" or "templates" (controllers, validators, cloudformation templates and etc).

Let me know what you think!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants