Skip to content

Commit

Permalink
moving back to simple pure JS, too gnarly to mix the TS and JS
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed May 28, 2019
1 parent 6785235 commit 673c19d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 487 deletions.
12 changes: 9 additions & 3 deletions prodserver/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import express from 'express'
import * as proxy from '../src/setupProxy'
// This file runs a simple production web server of the React production build
// it reuses setupProxy.js for consistent use of backend modules in dev and prod.
// This is plain JS rather than our TS setup in the React app because of that.
//
/* eslint-disable */
/* istanbul ignore file */

const express = require('express')
const proxy = require('../src/setupProxy')

const app = express()
const port = 3000

proxy(app)
app.use('/', express.static('../build'))

// eslint-disable-next-line no-console
app.listen(port, () => console.log(`BMD listening on port ${port}!`))
4 changes: 1 addition & 3 deletions prodserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"name": "prodserver",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"http-proxy-middleware": "^0.19.1",
"serve": "^11.0.0"
"http-proxy-middleware": "^0.19.1"
}
}
Loading

0 comments on commit 673c19d

Please sign in to comment.