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

We need a web server tutorial #34

Closed
JimBarry opened this issue Sep 12, 2015 · 11 comments
Closed

We need a web server tutorial #34

JimBarry opened this issue Sep 12, 2015 · 11 comments

Comments

@JimBarry
Copy link
Member

We need a quick way to:
a. confirm that hacker's machine has a web server installed, configd, and running
b. (if not a) the simplest possible way to get a web server-like thing onto their machine

@LDittmann
Copy link

a) on the machine running the web server, open a browser and type in http://localhost/ ---- blank page = no functioning web server
b) Apache? interested in hearing others' thoughts - I have not done this myself
c) is a self-hosted website the best option for this hacker? Would an internal file share or externally hosted site work better with less security risk to the users' home network?

Thanks for posting this question!

@jgravois
Copy link
Contributor

@LDittmann thanks for chiming in. i'd definitely agree that a web server that is only available internally is sufficient.

i plan on writing up instructions for both Python's SimpleHTTPServer (because Python is included on macs by default and laid down automatically with ArcGIS tools on Windows), and Node's http-server, because they are simple, lightweight, and don't require extensive configuration or admin priviledges on the machine.

@jgravois
Copy link
Contributor

i've got a sample here.
please feel to critique, revise, bash etc. i've got thick skin and i'm not married to any of it.

cc/ @nixta

@alaframboise
Copy link
Contributor

@JimBarry @jgravois What sections do we need a web server for? WAB?

@JimBarry
Copy link
Member Author

WAB doesn't need it, no, but doing stuff with the jsapi or leaflet im assuming does.

@alaframboise
Copy link
Contributor

No, if you check out the API exercises in "Develop", they all use jsBin.com. I made sure of it so we wouldn't have this requirement.

e.g https://github.com/Esri/geodev-hackerlabs/blob/gh-pages/develop/add_feature_layers_jsapi.md

Closing.

@jgravois
Copy link
Contributor

i know jsbin is convenient, but its garbage for debugging and i think its a poor decision to rely on it in geodev exercises, (particularly since we're using gh-pages to share our own examples).

@jgravois jgravois reopened this Sep 16, 2015
@alaframboise
Copy link
Contributor

@jgravois debugging jsbin is easy. Just select the arrow beside Output and load the page into a stand-alone window, View Source, Click the HTML and boom, it's just like normal debugging in Chrome. Couldn't be easier.

image

@andygup
Copy link
Member

andygup commented Sep 16, 2015

Yup.

However, to Jim's point it would be easy to list a couple helper links to folks who want to set up IIS on Windows or Apache on Mac. Eventually these folks will have to configure their machine with a local web server.

@jgravois
Copy link
Contributor

thats cool, but i didn't know it existed, so i can guarantee that no one getting their feet wet in web development for the first time will either.

what happens when you change a line of code? close the new window and repeat the process? if so, thats going to get old after about 3 minutes.

edit:
( just realized the two windows are dynamically tied. which is pretty cool. i still don't like the fact that you have to sift through the extra code that js.bin injects, but with a tiny tutorial, its an 80% better option than i originally thought)

i understand that it can be tedious to spend time in hackerlabs helping people set up their own environment, but supplying them with documentation in the meetup announcement that mentions both IIS/Apache and lighterweight options like SimpleHTTPServer and spending a few minutes with attendees at the event isn't a waste of time. it teaches them something that is a fundamental to actually getting real work done.

if anyone has trouble we can still fallback on jsbin if necessary.

@jgravois
Copy link
Contributor

jgravois commented Nov 8, 2015

decided to just add links to my gist to both the hackerlab meetup announcements and my own exercise.

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

5 participants