diff options
Diffstat (limited to 'bridge/index.js')
-rw-r--r-- | bridge/index.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bridge/index.js b/bridge/index.js new file mode 100644 index 00000000..8369f803 --- /dev/null +++ b/bridge/index.js @@ -0,0 +1,25 @@ +import express from 'express' +import { raw } from 'body-parser' +import cors from 'cors' +import debug from 'debug' +const log = debug('http') + +import oembed from '../vnext/server/middleware/oembed' + +const app = express() +app.use(raw()) +app.use(cors()) +const router = express.Router() + +router.get('/api/oembed', oembed) + +app.use(router) + +const PORT = 8081 +// start the app +app.listen(PORT, (error) => { + if (error) { + return console.log('something bad happened', error) + } + log('listening on ' + PORT + '...') +}) |