Skip to content
Sarah Laplante edited this page Mar 5, 2014 · 7 revisions

Thanks for helping build Finda! It's built by volunteers, so it's people like you who move the project forward.

We've collected some documentation on the pieces used in Finda at Development Resources, so if you're unfamiliar with anything that's a good place to start.

Development Notes

  1. This app reads in data.geojson (provided by the end user) and config.json (customized by the end user).
  2. It's all client-side Javascript with a single page for the entire app, so non-developers can deploy quickly.
  3. Keep everything human-readable.

Running Finda locally

Set up your computer

Mac or Linux
  1. Open the Terminal application.

  2. Make sure the command-line tool Git is installed by entering which git into Terminal. If the command returns a filepath, you're all set. (If Git is not installed, install it.)

Windows

Copy the code to your computer.

  1. Navigate to the folder you'd like to copy the code to by using the cd command.

  2. Clone the repository (i.e. copy the code) from where it's hosted online. Do this by entering git clone [email protected]:codeforboston/finda.git

  3. Open the folder you just downloaded using your favorite text editor. (We use Sublime Text.)

Add your data.

(The project already has sample data, if you're just trying to get it running you can use this data.)

Finda requires that your data is in GeoJSON format, since it's an open, web-friendly format.

If your data is not in GeoJSON format, you might try converting it using Ogre. We haven't used it ourselves, but it seems worth a try. We'll recommend an option we've tested in the future.

To consume a remote URL instead of the local data.geojson, open up config.json and modify the geojson_source variable. By default, this variable loads the local data.geojson.

Configure the application.

To configure the Finda app to display your data, fill in the configuration file.

TODO: Finish this section.

Style the application.

You can edit the display of your application using style.css in the styles directory.

TODO: Finish this section.

Running the server

Finda doesn't come with a built-in HTTP server, but there are a couple easy ones you can use.

  • On OS X, the Twisted library is built-in, and has an easy server to use: twistd -no web --path=. --port=8080.
  • If you're on a system with Node, you can use http-server:
npm install -g http-server
http-server
  • If you have Python (and most non-Windows systems do), it also comes with a simple, if not the best, server: python -m SimpleHTTPServer 8080

Once you've started one of those programs, you should see Finda at http://localhost:8080!

Testing

Finda comes with a set of unittests that you can run with Karma.

Installing Karma

npm install -g karma

Running the tests

karma server # starts a server which automatically runs the tests
Clone this wiki locally