aboutsummaryrefslogtreecommitdiff
path: root/bridge/index.js
blob: 727bd395c0905fcf10e32f8624955f8ac3031231 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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('/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 + '...')
})