blob: 2f3a7a5ff6f15e5d9d8c74b9a0b27d32558954fa (
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
|
const path = require('path')
const express = require('express')
const createBundle = require('./util').createBundle
const serveBundle = require('./util').serveBundle
const compression = require('compression')
module.exports = createMetamascaraServer
function createMetamascaraServer () {
// setup server
const server = express()
server.use(compression())
// serve assets
server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
server.use(express.static(path.join(__dirname, '/../../dist/mascara')))
server.use(express.static(path.join(__dirname, '/../proxy')))
return server
}
|