Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a cli #589

Open
jessekelly881 opened this issue Jun 11, 2024 · 1 comment
Open

Adding a cli #589

jessekelly881 opened this issue Jun 11, 2024 · 1 comment

Comments

@jessekelly881
Copy link

jessekelly881 commented Jun 11, 2024

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

@sukovanej
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants