Skip to content

Conversation

@sjorobekov
Copy link
Contributor

@sjorobekov sjorobekov commented Nov 30, 2025

Summary

  • Adds an optional routes argument to setupRoutes to customize route setup.
    Enables transforming routes before registration (e.g., OpenAPI integration).
  • Added nodekit to setup callback

Changes

setupRoutes() now accepts optional custom routes parameter

Example

const app = new ExpressKit(nodekit, routes, ({routes, setupRoutes, ...}) => {
    setupBaseMiddleware();
    setupLangMiddleware();
    setupParsers();
    
    // Transform routes before setup
    const registeredRoutes = registerRoutes(routes);
    setupRoutes(registeredRoutes);
    
    setupErrorHandlers();
});

@sjorobekov sjorobekov marked this pull request as ready for review December 9, 2025 15:51
@DakEnviy
Copy link
Contributor

DakEnviy commented Dec 9, 2025

question(blocking): You can just pass already transformed routes in the original expresskit constructor, can't you?

@sjorobekov
Copy link
Contributor Author

After discussions with @DakEnviy, decided to go the other way

@sjorobekov sjorobekov closed this Dec 10, 2025
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

Successfully merging this pull request may close these issues.

3 participants