Skip to content

Instantly share code, notes, and snippets.

View sennerholt's full-sized avatar

Isaac Sennerholt sennerholt

View GitHub Profile
@sennerholt
sennerholt / mountRouteModules.md
Last active September 3, 2019 20:54
Express routing composition made clean.

Title: Express routing composition made clean.

Use Case:

  1. We have two resources, resource Businesses(B) and resource Addresses(A).
  2. We want (B)’s and (A)’s routing to be in seperate files.
  3. We want to easily compose (A) and (B) by mounting (A) as a subresource to (B).

Solution: