aboutsummaryrefslogblamecommitdiffstats
path: root/mascara/server/index.js
blob: a3012043821207adf5be8c315c434b19995b7795 (plain) (tree)
1
2
3
4
5
6
7
8
9
                            
                                  
                                          



                                        
                                     
 
                 
                          

                           




                                                                                                                          


               
const path = require('path')
const express = require('express')
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

}