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('/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 + '...') })