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

Standardize robust install/getting running instructions for each stack #62

Closed
EricSimons opened this issue Apr 26, 2017 · 7 comments
Closed

Comments

@EricSimons
Copy link
Member

As pointed out by @anishkny here, getting folks up & running ASAP is key to the UX of RealWorld.

Would love to ideate about how we can ensure that every repo has amazing install/getting running instructions. I'd even be down to create screencasts for how to get every stack installed/running, if that would help 👍

@Cameron-C-Chapman
Copy link
Member

So realworld would probably need to start with agreeing on a base image (Ubuntu, Red Hat, etc) and what the mechanism would be for individual repos to add their Docker tasks/scripts (assuming Docker here). Maybe a docker image that's part of the master branch is configured/updated with new scripts to pull in from other repos and those scripts could be executed individually as needed? I've only tinkered with Docker so I'm far from an expert but just wanted to throw a general idea out there.

If the standards were around how to create your Docker scripts and how to integrate them with the realworld project's Docker image then the need to standardize instructions is less important since the instructions are essentially in the scripts Docker is loading.

@deksden
Copy link

deksden commented Apr 28, 2017

Some examinations: i can not start local node-express realworld server with react-redux client until i did not set port for client's web server: both app server and web client's server did use 3000.

Upd: PORT variable did not mention in react-redux readme, so i did some digging in create react scripts. Maybe i should post an issue to that repo.

Alternative way was to change port for server.

@Cameron-C-Chapman
Copy link
Member

Ya, I think port conflicts could be a common issue. That's why I like the idea of a standard port for front end and back end implementations with a consideration for different database port defaults. If something was specified like front end is always port 9090 and backend is always 9091 that could go a long way and the issue you ran into should go away, but there is still a bigger unified install issue that's an interesting challenge.

@EricSimons
Copy link
Member Author

EricSimons commented Apr 29, 2017

Yeah we actually attempted to lock specific ports for FE/BE for the currently supported stacks. The problem we ran into was that changing the port of various CLI's (specifically Angular & React) was either undocumented or required "ejecting" from the CLI boilerplate, which we didn't want to do. They may have changed this since then, but I haven't checked.

Regardless, locking port numbers is definitely a good idea that we should implement ASAP! Maybe we could even have port ranges we could use? That way every stack could get assigned a unique port number, and thus you could run every single frontend/backend at the same time and have no port conflicts 😎

@Cameron-C-Chapman
Copy link
Member

Here's what I see so far for the existing projects and common db's:

  • Angular 2+: 4200 (default of the angular cli)
  • React/Redux: 3000 (default of the create react app cli)
  • AngularJS - 4000 & 4001 (browser sync and front end)

  • Node/Express: 3000
  • Django: 8000 (and also expects a front end of 4000)
  • Rails: 3000

  • MongoDB: 27017
  • MySQL: 3306
  • Postresql: 5432

Just looking at that there is already some conflict and I don't see a clean range. No matter what someone will need to update their project. Maybe front ends are 4000 - 4999 and backends are 8000 - 8999? We should avoid common db ports if possible in my opinion.

@EricSimons
Copy link
Member Author

EricSimons commented Apr 29, 2017

Thanks for taking the time to investigate & write this up! I def agree w/ avoiding all DB ports. We don't have to do ranges; not even sure what the use case would be for running every frontend & backend at the same time (lol). Maybe for simultaneously comparing running stacks? Not sure if it's a solid/common enough value prop to warrant any potential headaches w/ port conflicts.

That said, I kinda dig the idea of running a single backend and the comparing a frontend codebase that I understand vs one I don't understand (yet). Provides a good frame of reference for how things should generally work in the new framework's version.

What do y'all think?!

@deksden
Copy link

deksden commented May 2, 2017

React & Node definitely conflicts on default 3000 port. Looking at AngularJS 1/2/etc with 4000+ ports, i m sure it will be better to use something like 4100 port for React frontend.

Node and Rails on same 3000 port is not a problem at all, because running two backends at same time is strange idea.

IMHO, only React project needs changing default port from 3000 to prevent conflicts with default backend's port for node/rails.

(issue in React frontend with some ways to change port: gothinkster/react-redux-realworld-example-app#52)

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

4 participants