A sample Koop application with some common providers.
This app makes it easy to get started running your own instance of Koop. It's also helpful for trying out Koop's functionality and testing providers, caches, plugins, and deployments.
If you're new to Node.js development, you can read more about setting up a development environment.
Clone this repository on your machine.
git clone [email protected]:koopjs/koop-sample-app.git
Change the working directory to the newly created koop-sample-app
folder.
cd koop-sample-app
Install Koop's dependencies.
npm install
Create a koopdev
PostgreSQL database and enable PostGIS.
$ createdb koopdev
$ psql koopdev
koopdev=# CREATE EXTENSION postgis;
CREATE EXTENSION
koopdev=# CREATE EXTENSION postgis_topology;
CREATE EXTENSION
koopdev=# CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION
koopdev=# CREATE EXTENSION postgis_tiger_geocoder;
CREATE EXTENSION
If using Windows, you can install PostgreSQL from the [EnterpriseDB download] (http://www.enterprisedb.com/products-services-training/pgdownload), and install PostGIS by running StackBuilder at the end of the Install. Choose the option to create a new DB with the PostGIS Install, and note the name of the DB in your config file. In the config file, you may need to explicitly provide a user/pw such as
"conn": "postgres://postgres:<pw>@localhost/koopdev"
Start the server.
npm start
Take Koop for a test drive!
This sample app includes the following providers:
You can try fetching a resource directly in the browser (such as localhost:1337/github/benbalter/dc-wifi-social/bars/) to confirm koop is running.
Information about deploying this sample can be found here.