diff --git a/README.md b/README.md index 3d52003..190a5aa 100644 --- a/README.md +++ b/README.md @@ -15,22 +15,25 @@ As of 2014-03-12, we're live at https://fbopen.gsa.gov . This gets you a minimum viable setup: -```sh -$ cd fbopen -$ FBOPEN_ROOT=~/your/root/to/fbopen ./inital-dev-setup.sh -``` + cd fbopen + export FBOPEN_ROOT=~/your/root/to/fbopen + chmod 755 inital-dev-setup.sh + ./inital-dev-setup.sh To clean out any new files created from that script, as well as uninstall Elasticsearch, you can run: -```sh -$ ./initial-dev-uninstall.sh -``` + ./initial-dev-uninstall.sh + ### How to get started (manually) * Clone this repo. * This repo has an external dependency on another git repo, which needs to be populated at first, so `cd` to the repo and run: `git submodule update --init --recursive`. -* Then install Elasticsearch. FBOpen requires at least version 1.2. -* Get the API server up and running. See the README.md in `/api`. +* Then install and start Elasticsearch. FBOpen requires at least version 1.2. +* Start Elasticsearch: + + elasticsearch + +* Get the API server up and running. See the [README.md](https://github.com/18F/fbopen/blob/cloud_foundry/api/README.md) in `/api`. * Load data into the search index using the import tools in `/loaders` -- or roll your own, ~~or use the API's POST `/v0/opp` to post opportunities one at a time~~ (POST functionality is temporarily disabled). * To run a simple query web page, try the sample app in `/sample-www`. * A quick and easy way to access this page at localhost, provided you have Python installed, is to `cd` to the `/sample-www` directory and run: `python -m SimpleHTTPServer`. By default, you'll then be able to access the client at http://localhost:8000 diff --git a/api/README.md b/api/README.md index 6003390..eae9293 100644 --- a/api/README.md +++ b/api/README.md @@ -1,17 +1,34 @@ # FBOpen API Server ### Install and Run -To install: -* First [install Elasticsearch](https://github.com/18f/fbopen/tree/master/elasticsearch) if you haven't already. -* For local usage: - * `$ cp config-sample_dev.js config.js` -* For production usage: - * `$ cp config-sample.js config.js` -* Install dependencies: `$ npm install` - * If your default version of Python is > 2, you will need to specify your path to Python 2.7 for npm to successfully install one of the Node packages. - * `$ npm install --python=/usr/local/bin/python2.7` - -To run: `node app.js` (or, say, [`nodemon app.js`](https://github.com/remy/nodemon)) +1. To install, first [install Elasticsearch](https://github.com/18f/fbopen/tree/master/elasticsearch) if you haven't already. +2. Run elasticsearch: + + elasticsearch + +3. For local usage, re-name the sample JS file: + + cp api/config-sample_dev.js api/config.js + +4. Go into the `api` directory: + + cd api/ + +5. For production usage: + + cp api/config-sample.js api/config.js + +6. Install dependencies: + + npm install + + Note: If your default version of Python is > 2, you will need to specify your path to Python 2.7 for npm to successfully install one of the Node packages: + + npm install --python=/usr/local/bin/python2.7 + +7. To run the app: + + node app.js (or, say, [`nodemon app.js`](https://github.com/remy/nodemon)) ### API Documentation and Examples Documentation for this API is at [https://pages.18f.gov/fbopen/](https://pages.18f.gov/fbopen/), but here are a couple quick sample queries to get you started: