1. Development Environment
Setting up a development environment for Koop
All you need to have installed before Koop will run is a Node.js environment and an internet connection. We recommend using version 6, which is the long term stability release.
Once Node is installed run:
- npm init
- npm install -S koop
- npm install (any koop provider)
Koop uses an in-memory cache by default. A PostGIS cache koop-pgcache will store data independent of the Koop server processes and speed up queries, but it is optional. See caches for more details.
Supported Operating Systems
Koop has been tested on:
- OS X
- 10.9 (Mavericks)
- 10.10 (Yosemite)
- Server 2008R2
- Server 2012R2
2. Express server
Koop exposes an Express server at
koop.server which can be instructed to listen on port 80 (or any port of your choosing) as in the example below.
You can also run Koop as middleware in an existing Express server.
If you want to mount Koop at a route other than
/koop you can use Koop as middleware and mount it wherever you like.
Once you’ve got a development environment, an Express server, and a database, all you need to do is configure your providers! See the complete list of providers for further instructions.
4. Start the server!
If you’ve got everything set up properly, you should be able to start the server! Add a script to you package.json like the example below that points to your server file and type