blob: 8369f80395c371cbfde6afb436654726d7627cb9 (
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('/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 + '...')
})
|