---
title: "Makelight Router 1"
description: "A two-file path-routing rule set that split makelight.com between the old Heroku app and a new Next.js front end, one URL path at a time."
url: "https://stef.io/projects/makelight-router-1"
kind: "hack"
dates: "2019"
status: "unknown"
---

# Makelight Router 1

A two-file path-routing rule set that split makelight.com between the old Heroku app and a new Next.js front end, one URL path at a time.

Two files, one commit. `rules.json` is a list of path rules: `/`, `/blog`, `/free`, `/membership`, `/podcasts`, `/about`, `/online-courses`, `/articles/**`, `/lessons/**`, `/pages/**` and the static and `/_next/**` asset paths all go to `next.makelight.com`; `/lessons/next` and `/articles/categories/members` are pinned back to `makelight.herokuapp.com`; everything not matched falls through to `makelight.herokuapp.com`. `deployment.txt` is the whole deployment procedure: “To deploy: now alias makelight.com -r rules.json”. It is the seam of a migration held in version control — the rewritten pages already cut over, the two members-only pages deliberately left on the old app, and the default still pointing at the thing being replaced.

## Links

- [Code](https://github.com/stefl/makelight-router-1)
