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

feat: Allow services to run at startup #617

Merged
merged 11 commits into from
Mar 22, 2022

Conversation

crookse
Copy link
Member

@crookse crookse commented Mar 11, 2022

Summary

  • Placed types and interfaces to be reused in interfaces.ts and types.ts
  • Added runAtStartup to service interface
  • Added Server.addResource().
  • Refactored server to allow services to run at startup
  • Removed T prefix from types. I don't know why I started doing this, but they're obviously types because they come from the types.ts file. woooooOoOopz.
  • Started effort to move our server to expect a service interface as opposed to the Service class (kind of like how we're doing it for the error handler -- we expect an interface, not a class)

@crookse crookse added the Type: Minor Merging this pull request results in a minor version increment label Mar 11, 2022
Copy link
Member

@ebebbington ebebbington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there will also be problems with #getRequest, because that method uses this, but inside deno's listen API, this will refer to the function as our server class is no longer in the scope

src/http/server.ts Show resolved Hide resolved
Copy link
Member

@ebebbington ebebbington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs needed for website too i assume?

@crookse
Copy link
Member Author

crookse commented Mar 12, 2022

@ebebbington , yea docs are needed

@crookse crookse force-pushed the feat/allow-services-to-run-at-startup branch from 52de2e7 to 04af103 Compare March 22, 2022 02:27
@crookse crookse changed the title feat: allow services to run at startup feat: Allow services to run at startup Mar 22, 2022
@crookse crookse merged commit b47ec40 into main Mar 22, 2022
@crookse crookse deleted the feat/allow-services-to-run-at-startup branch March 22, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Minor Merging this pull request results in a minor version increment
Development

Successfully merging this pull request may close these issues.

2 participants