Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In a Next.js + Now context you'd use the path alias feature [1] of now in production, using a rules.json file to do the route mappings to other microservices or external URLs.

In development you'd use micro-proxy [2] and define a rules-dev.json with local mappings, and then have a package.json script to fire up that proxy for local testing.

[1] https://zeit.co/docs/features/path-aliases#path-alias

[2] https://github.com/zeit/micro-proxy



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: