###Getting Started
for current example/to see progress, go to http://treemap.hogan.io/
to deploy:
- clone this repo down. make sure you have npm install and nodejs on your system
- In the project root -
sudo npm install
- go in to the client repo
cd server
, andsudo npm install -g bower
thenbower install
- go back to the root project leve
cd ..
and run the index.js filenode server/server.js
. This has babel on-the-fly convert the backend files, which some files contain es2015, to es5.
This app is running on a digital ocean 512mb droplet. The node backend is the API and hosts the static front end angular app
#####NGINX Proxy (3000 to 80)
follow these instructions until 'install apache': https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-reverse-proxy-for-apache
here is my configuration file:
server {
listen 80;
server_name treemap.hogan.io;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000;
}
}
coming soon
####database stuff first: ALTER TABLE tree_plantingswgs84 ADD COLUMN neighborhoodName character varying(50)
then: UPDATE tree_plantingswgs84 SET neighborhoodName = neighborhoodwgs84.label FROM neighborhoodwgs84 WHERE ST_Intersects(neighborhoodwgs84.geom,tree_plantingswgs84.geom);
SELECT name FROM jacksonco_schools, medford_citylimits WHERE ST_Within(jacksonco_schools.the_geom, medford_citylimits.the_geom);