Created
March 13, 2017 19:35
-
-
Save dmfenton/1f252732bfa66bca4ff0a21628fb7ec1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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