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

Add Node.js API #28

Open
ritch opened this issue Oct 7, 2013 · 1 comment
Open

Add Node.js API #28

ritch opened this issue Oct 7, 2013 · 1 comment

Comments

@ritch
Copy link

ritch commented Oct 7, 2013

I'd like to refactor server.js a bit for use directly in node. My proposal is to move the CLI bits into bin/cli.js and make server.js the entry point.

Let me know if you have a better approach, or are unlikely to accept a patch that includes these changes.

@bajtos
Copy link
Collaborator

bajtos commented Oct 8, 2013

I 'd like to refactor server.js a bit for use directly in node.

That's a good idea.

My proposal is to move the CLI bits into bin/cli.js and make server.js the entry point.

Keep in mind there is both client and server CLI inside reggie package. For the sake of consistency, both client and server CLI should be moved to bin (although you don't have to refactor the client code to be usable on it's own).

Maybe move to bin/server-cli.js and bin/client-cli.js?

I was about to suggest moving server.js to lib/server.js, but then realised the current file structure is better, as the developer can write require('reggie/server') and require('reggie/client').

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

No branches or pull requests

2 participants