dcfemtech / hackforgood-waba-map

DCFemTech Hack for Good 2016 - WABA Bike Map Project
MIT License
10 stars 9 forks source link

Set up local development environment #67

Closed dmfenton closed 8 years ago

dmfenton commented 8 years ago

Hi! I was trying to close the issue on instructions to run this locally and found that it wouldn't actually load the data. So I went a bit further. I hope this helps!

In this PR I:

Resolves #55

danfowler commented 8 years ago

Works on my machine! 👍

alulsh commented 8 years ago

@dmfenton - thanks for creating a package.json for this project. Also, thanks for your patience in me reviewing - I was at Black Hat & DEF CON last week when you submitted this and was mostly offline.

moved app related files to /app moved geojson to /data

Can you elaborate on the benefits of moving these files to different directories?

set up a local dev server with live reload => gulp

To run this project locally I typically use the serve npm module to create a web server so that the XHR requests for the GeoJSON data in the loadURL() calls succeed. Live reload works when using serve as well.

For example, I can do the following steps to set up a local development environment:

  1. git clone git@github.com:dcfemtech/hackforgood-waba-map.git or git clone https://github.com/dcfemtech/hackforgood-waba-map.git depending on your git authentication setup.
  2. cd hackforgood-waba-map
  3. npm install -g serve (with a proper package.json this would eventually be npm install)
  4. serve
  5. Visit http://localhost:3000/ in the browser and develop locally.

This PR introduces dependency bloat and complexity via 8 gulp dev dependencies and a gulp task file. The local web server with live reload could be accomplished instead with one npm module (serve) or using a simple Python web server via python -m SimpleHTTPServer.

If you rewrite this PR to only us serve (or an equivalent simple web server npm module) and update the README.md to reflect this I'll gladly merge it.

@dmfenton - thanks again for tackling https://github.com/dcfemtech/hackforgood-waba-map/issues/55 - I really appreciate your help on this project!

alulsh commented 8 years ago

@NealHumphrey is blocked from working on https://github.com/dcfemtech/hackforgood-waba-map/issues/65 until we get a package.json set up. Closing in favor https://github.com/dcfemtech/hackforgood-waba-map/pull/70.