mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-12-21 02:21:56 +00:00
18 lines
510 B
JavaScript
18 lines
510 B
JavaScript
const express = require('express')
|
|
const cors = require('cors')
|
|
const netlifyCmsBackendFsMiddleware = require('netlify-cms-backend-fs/dist/fs')
|
|
|
|
const app = express()
|
|
|
|
const corsMiddleware = cors()
|
|
// app.use(cors({ credentials: true, origin: true }))
|
|
app.options('*', corsMiddleware)
|
|
app.use(corsMiddleware)
|
|
|
|
netlifyCmsBackendFsMiddleware(app)
|
|
app.use(express.static('public'))
|
|
|
|
// const bundler = new parcel('src/index.html')
|
|
// app.use(bundler.middleware());
|
|
|
|
app.listen(4242, () => console.log('Running'))
|