Skip to content

Instantly share code, notes, and snippets.

@dmfenton
Created March 13, 2017 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmfenton/1f252732bfa66bca4ff0a21628fb7ec1 to your computer and use it in GitHub Desktop.
Save dmfenton/1f252732bfa66bca4ff0a21628fb7ec1 to your computer and use it in GitHub Desktop.
//clean shutdown
process.on('SIGINT', () => process.exit(0))
process.on('SIGTERM', () => process.exit(0))
// Initialize Koop
const Koop = require('koop')
const koop = new Koop()
// Install the Yelp Provider
const yelp = require('yelp')
koop.register(yelp)
// Start listening for http traffic
const config = require('config')
const port = config.port || 8080
const express = require('express')
const app = express()
app.use('/koop', koop.server)
app.listen(port)
console.log(`Koop Yelp listening on ${port}`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment