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

Port keeps running when passed on start method. It can’t get killed either. #627

Closed
Tracked by #704
deadcoder0904 opened this issue Apr 1, 2020 · 2 comments
Closed
Tracked by #704

Comments

@deadcoder0904
Copy link

When I did this, it kept on running. Even if I killed the port, it kept on running. Some weird issue. I had to close my text editor VSCode to get rid of the port from constantly running. It didn’t even work even if I killed using some unix wizardry. This used to work earlier as it’s the same code from 6 months early. I just updated dependencies after not touching it for months. Weird thing is I didn’t update graphql-yoga dependency. It was and is 1.18.3 because its the latest.

server.start(() =>
 console.log(
 `🚀 Server ready at: http://localhost:4000\n⭐️ See sample queries: http://pris.ly/e/js/graphql#6-using-the-graphql-api`,
 ),
)

But then I changed the code to the following:

const options = {
  port: 4004,
}

server.createHttpServer(options).listen(options.port, 'localhost', () => {
  console.log(
    `🚀 Server ready at: http://localhost:${options.port}\n⭐️ See sample queries: http://pris.ly/e/js/graphql#6-using-the-graphql-api`,
  )
})

And the port started working. Maybe it’s Prisma 2 or maybe GraphQL Yoga but thought you should know either ways. The above code looks more simpler anyways :)

@saihaj saihaj mentioned this issue Dec 5, 2021
32 tasks
@saihaj
Copy link
Collaborator

saihaj commented Feb 19, 2022

Hey @deadcoder0904 we @the-guild-org are the new maintainers of this project. We are actively developing v2. This should be addressed in the new version. Would love to get your feedback on beta release @graphql-yoga/node@beta

@saihaj saihaj closed this as completed Feb 19, 2022
@deadcoder0904
Copy link
Author

That was too long ago. Idk if I'm still using this project but if I do, I'll give it a try & comment here :)

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

No branches or pull requests

2 participants