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

Expose an API to react-server-cli's startServer. #54

Merged
merged 1 commit into from
Apr 4, 2016

Conversation

aickin
Copy link
Contributor

@aickin aickin commented Mar 9, 2016

Implements a simple export of the startServer API, as proposed in #33 and #50, so that servers can be started up programmatically.

I think it's probably also a good idea to expose the client compilation as an API to allow more flexibility, but I believe that's orthogonal to this PR.

// before they get loaded.
const logging = require("react-server").logging,
logger = logging.getLogger(__LOGGER__),
start = require(".").start;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying that renaming makes it look like the entire file is new. :(

So you don't have to look for yourself: this is one of the two lines changed in this file. I used "." so that it would be sure use the exposed API function.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tricky . business.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to switch to ./index if you want. Felt slightly DRYer this way but slightly more confusing.

@roblg
Copy link
Member

roblg commented Mar 14, 2016

LGTM

@gigabo
Copy link
Contributor

gigabo commented Apr 4, 2016

This is cool.

@gigabo gigabo merged commit c0f6f9d into redfin:master Apr 4, 2016
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

Successfully merging this pull request may close these issues.

3 participants