Skip to content
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

NestJS adapter #191

Open
talentlessguy opened this issue Nov 28, 2020 · 23 comments
Open

NestJS adapter #191

talentlessguy opened this issue Nov 28, 2020 · 23 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed medium new package Request for new middleware / package

Comments

@talentlessguy
Copy link
Member

talentlessguy commented Nov 28, 2020

Is your feature request related to a problem? Please describe.

An adaper for Nest will let you use tinyhttp inside of Nest instead of Express.

Describe the solution you'd like

A Nest.js adapter package, something like @tinyhttp/nest-adapter

Additional context

Please pull request to this repository

@talentlessguy talentlessguy added enhancement New feature or request good first issue Good for newcomers new package Request for new middleware / package medium labels Nov 28, 2020
@talentlessguy talentlessguy pinned this issue Dec 10, 2020
@talentlessguy talentlessguy unpinned this issue Dec 23, 2020
@ognjenjevremovic
Copy link

Hey @talentlessguy I see this issue is opened for quite some time.
I would like to see tinyhttp integrated with NestJS; do you mind if I take a closer look at this if it is not already implemented / worked on?

Also, I am wondering how would one test the underlying implementation of the mentioned adapter?
Should a dummy application be made (or perhaps taken from NestJS samples) or some sort of tests should be written to cover this implementation?
Do you have any guidelines / preferences about this?

@talentlessguy
Copy link
Member Author

@ognjenjevremovic you could either create the separate repo with your own rights and else, or create a pull request

to test the implementation you can create an example in examples folder and of course write a bunch of unit tests

@talentlessguy talentlessguy added the help wanted Extra attention is needed label Sep 7, 2021
@talentlessguy
Copy link
Member Author

if anyone wants to work on that, I'll create a new repo for NestJS

@KaviiSuri
Copy link

Hey, I'd love to give it a shot, but I'm kinda new to open source and was hoping for some guidance on how to do it?

@talentlessguy
Copy link
Member Author

@KaviiSuri I'll create a new repo in the org and will assign you as a contributor

does this sound good for you?

@KaviiSuri
Copy link

Yeah, sounds good!!

Also, I'm new to tinyhttp and beginner with nestjs, so could you give me some resources to get started too?

@talentlessguy
Copy link
Member Author

talentlessguy commented Sep 12, 2021

@KaviiSuri there's tinyhttp documentation website

regarding Nest, it's the same, I mean there is also docs

and also see links above for specific info

@KaviiSuri
Copy link

Okay, thanks, I'll get to it

@KaviiSuri
Copy link

Hey, I'm going through the docs and code samples you refrenced

As of now, it seems like I need to implement the AbstractHTTPAdapter interface along with creating a ITinyHTTPNestApplication interface that extends INestApplication

Is that it? Is there something I've missed?

@talentlessguy
Copy link
Member Author

@KaviiSuri no idea, I haven't ever used Nest :/

@KaviiSuri
Copy link

Hey man, I'm not home this week, I'll start working the adapter the coming week. Just wanted to keep you in the loop.

@pSnehanshu
Copy link

Has there been any progress on the NestJS adapter @KaviiSuri? I am unable find the repo, @talentlessguy was it deleted or made private?

@KaviiSuri
Copy link

Hey @talentlessguy even I couldn't see the repo so I thought I shouldn't continue..
Anyway, i have enough time to contribute now, could you just create one so I could get started?

@talentlessguy
Copy link
Member Author

@KaviiSuri made the package public https://github.com/tinyhttp/nest

@KaviiSuri
Copy link

Thanks, will get started on this asap.
I may need help on testing it though, I'll contact when I get to it.

@KaviiSuri
Copy link

Hey @talentlessguy , I started implementing the adapter and I need a little help.
How can I start tinyhttp with https?
I tried doing it with the standard https package from node but it doesn't respond with anything.
I was unable to find it in the docs

@pSnehanshu
Copy link

Why do you want to do that?

@talentlessguy
Copy link
Member Author

@KaviiSuri HTTPS doesn't work in tests I think, it's a GitHub Actions issue

@KaviiSuri
Copy link

@pSnehanshu i actually need to support a nestjs option that turns on https.

@talentlessguy I actually don't need it tests, I just couldn't find how to do it with tinyhttp in an application too

@rubiin
Copy link

rubiin commented Nov 8, 2022

@talentlessguy can i work on it

@talentlessguy
Copy link
Member Author

@rubiin yes

@rubiin
Copy link

rubiin commented Nov 8, 2022

I have a simple workable solution ready. Maybe you can publish the package under @tinyhttp/nestjs-platform-tinyhttp after i submit my pr

@talentlessguy
Copy link
Member Author

@rubiin please do a PR to this repo

@rubiin rubiin removed their assignment Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed medium new package Request for new middleware / package
Projects
None yet
Development

No branches or pull requests

5 participants