Demo iOS app which uses Node.js for its API
Objective-C JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
TreeSearch.xcodeproj
TreeSearch
TreeSearchTests
node_modules
.gitignore
Default.png
Default@2x.png
Icon.png
Icon@2x.png
README.md
Trees.sql
trees.js

README.md

TreesDemo

Demo iOS app which uses Node.js for its API. The trees database is from Fingal Open Data. I slightly modified it by removing some bogus data.

This code was created for a demo so it assumes everything is running on one machine - Node.js, PostgreSQL, the iOS app in the iPhone simulator, etc.

Installation

You can install node from the nodejs website or use homebrew:

brew install node

The node app uses a PostgreSQL database. Mac OS X has PostgreSQL built in, but I had trouble with that so I used homebrew to install the latest version:

brew install postgresql

To set up the db:

createdb Trees
psql Trees < Trees.sql

You should now be able to run the app:

node trees.js

The iOS app is set up to look for the server at localhost. To run on a device you will need to change this to the actual address of your server. Edit #define SERVER_HOST in RMListViewController.m and RMSearchViewController.m to do this.