luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Add format flag to `lucky routes` for outputting alternate formats #1852

Open jwoertink opened 4 months ago

jwoertink commented 4 months ago

We currently have some nice output when you run lucky routes

image

I've been working with front end APIs a lot lately, and just had the idea of what if you could do something like lucky routes --format=json then have a json file that maps all of these routes. Drop that file in to your SPA and somehow hook it up in a way that if a route changes on the backend, it would be updated on the frontend.

The use case could be for whatever really, but just having an alternate format option might be nice.