-
-
Notifications
You must be signed in to change notification settings - Fork 100
Developing Finda
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.
- This app reads in data.geojson (provided by the end user) and config.json (customized by the end user).
- It's all client-side Javascript with a single page for the entire app, so non-developers can deploy quickly.
- Keep everything human-readable.
-
Open the Terminal application.
-
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.)
-
Navigate to the folder you'd like to copy the code to by using the cd command.
-
Clone the repository (i.e. copy the code) from where it's hosted online. Do this by entering
git clone git@github.com:codeforboston/finda.git
-
Open the folder you just downloaded using your favorite text editor. (We use Sublime Text.)
(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
.
To configure the elements on the page edit the Configuration.
You can edit the display of your application using style.css
in the styles
directory.
TODO: Finish this section.
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
:
# global install
npm install -g http-server
http-server
# local install
npm install http-server
node_modules/.bin/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!
In order to build and test the project, you'll need to download software packages (they are defined in package.json). Thankfully, node package manager (aka npm) does the hard work with a single command:
npm install
Finda comes with a set of unittests that you can run with Karma.
npm run-script test