Internal Release Process
Problem
The app consists of three routes /topics/, /topics/*, /topics/page/
Since we have a catch all route -> /topics/* and want to release new topic ids e.g /topics/1164/ incrementally, we need a way to release new routes on stage without blocking releases on production.
Process
We add the routes we would like to be only available on stage by specifying them inside the remix.config.mjs routesPrefixesStage array e.g
export const routePrefixesStage = ["basePath/new-id/"];
Now you are one step away from deploying your new route on stage 🎊. Inside your cdk deployment module e.g cdk.mts import your new routes. Add them to the normal routePrefixes for the stage environment e.g
import {
basePath,
routePrefixes,
routePrefixesStage,
} from "path-to-config"
{
...restConfigForStage,
basePath,
appPaths: [...appPaths, ...routePrefixesStage],
}
Huuuuraay!! 🎊😎 you are ready to test your routes on stage after successful deployment.