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

Investigate making code contributions easier with Gitpod #2772

Open
5 of 9 tasks
jankeromnes opened this issue Jan 15, 2019 · 5 comments
Open
5 of 9 tasks

Investigate making code contributions easier with Gitpod #2772

jankeromnes opened this issue Jan 15, 2019 · 5 comments
Labels
developer-experience Dev tooling, test framework, and CI

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Jan 15, 2019

📋 Description

Following up from #2697 (comment).

I would like to make life easier for potential new shields.io contributors by implementing gitpod.io support for Shields development. Disclaimer: I work on Gitpod.

This could provide newcomers (and also Shields maintainers) with pre-configured workspaces in the cloud, allowing them to get started instantly, without having to first set up a complete development environment themselves.

TODO:

Please let me know what you think of this idea, and if you know other setup/configuration things that should be automated for new contributors.

paulmelnikow added a commit that referenced this issue Jan 15, 2019
This fixes e.g. `node server 8080 0.0.0.0`.

Ref #2772.
@paulmelnikow
Copy link
Member

This sounds really neat!

Oops, you're supposed to be able to set the bind address on the command line, like node server 8080 0.0.0.0, though it looks like it's broken. I opened #2773 with a fix.

I think you could skip ImageMagick. It's only needed for the raster (i.e. .png, .gif, .jpg) badges. That's a fairly unusual use case and most people probably would not need it for development.

@jankeromnes
Copy link
Contributor Author

Wow, thanks a lot for the quick fix! 💯 It looks good to me, I'll try it out.

Is there a way to use node server 8080 0.0.0.0 through a convenient command like npm start?

shields/package.json

Lines 103 to 106 in a58de54

"start:server": "cross-env NODE_CONFIG_ENV=development node server 8080",
"now-start": "node server",
"prestart": "run-s --silent depcheck defs features",
"start": "concurrently --names server,frontend \"npm run start:server\" \"cross-env BASE_URL=http://localhost:8080 BABEL_ENV=dev-prod next dev\"",

Maybe there should be some sort of npm start:public-server?

@paulmelnikow
Copy link
Member

Does Gitpod need it to be an npm script?

It's surprising, but Heroku, Zeit Now, our production VPS, and I think our docker config seem content with the server binding to localhost.

Probably we could find a way to do that if necessary.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Jan 15, 2019

Does Gitpod need it to be an npm script?

No, Gitpod can start any command, but I was thinking that it's quite nice to have one command start both the server and the front-end (using the concurrently NPM command).

It's surprising, but Heroku, Zeit Now, our production VPS, and I think our docker config seem content with the server binding to localhost.

Interesting. Are requests to the badge server on 8080 only ever made via localhost? If developers never need to access it via a web preview (i.e. if they never need to use 8080 directly, or if something like curl localhost:8080 is sufficient), then there is no need to expose port 8080 publicly.

@paulmelnikow
Copy link
Member

The typical dev flow is both servers running on localhost. The web preview works on localhost:8080.

How is Gitpod configured? Is there a config file that would get checked into the repo? That might be the best place to define a command that can be tailored for this situation.

@paulmelnikow paulmelnikow added the developer-experience Dev tooling, test framework, and CI label Jan 15, 2019
paulmelnikow added a commit that referenced this issue Jan 15, 2019
This fixes e.g. `node server 8080 0.0.0.0`.

Ref #2772.
paulmelnikow added a commit that referenced this issue Jan 16, 2019
This fixes e.g. `node server 8080 0.0.0.0`.

Ref #2772.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Dev tooling, test framework, and CI
Projects
None yet
Development

No branches or pull requests

3 participants
@jankeromnes @paulmelnikow and others