effect-http icon indicating copy to clipboard operation
effect-http copied to clipboard

Adding a cli

Open jessekelly881 opened this issue 1 year ago • 1 comments

Having a cli might be handy(I'd be happy to create a PR if there's interest. I don't suspect that it would be too much work):

effect-http.config.ts

import { Router } from "src/router.ts"

export default createConfig({
    router: Router
})

Dump openapi def to file: npx effect-http codegen openapi -o api.yml

Start test server: npx effect-http serve -p 8000

jessekelly881 avatar Jun 11 '24 00:06 jessekelly881

Sounds pretty cool. I've also noticed some discussions in the Effect Discord about generating a CLI for a HTTP API and that would be possible for effect-http based apps as well. Definitely, feel free to send a PR and we can iterate.

sukovanej avatar Jun 22 '24 22:06 sukovanej