Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(server): remove HTTPS server and config, remove spdy, remove `ge…
Browse files Browse the repository at this point in the history
…nssl` script

feat(server): remove HTTPS server and config, remove spdy, remove
`genssl` script
  • Loading branch information
Metnew committed Nov 4, 2017
1 parent cb7adc3 commit 0d8ddb5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 48 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"semantic-ui-css": "^2.2.12",
"semantic-ui-react": "^0.75.1",
"serialize-javascript": "^1.4.0",
"spdy": "^3.4.7",
"store2": "^2.5.9",
"styled-components": "^2.2.3"
},
Expand Down Expand Up @@ -152,7 +151,6 @@
"frontend_build": "NODE_ENV=production webpack --config webpack_config/client/webpack.prod.babel.js",
"test": "NODE_ENV=test jest --config=jest_config/jest.config.json --coverage --forceExit || true",
"snapshot_update": "NODE_ENV=test jest --config=jest_config/jest.config.json --coverage --updateSnapshot",
"genssl": "openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ./src/server/config/ssl/server.key -out ./src/server/config/ssl/server.crt",
"start": "node ./dist/server",
"lint:styles": "stylelint ./src/common/**/*.scss -s scss --config ./.stylelintrc --fix",
"lint:scripts": "eslint -c ./.eslintrc.json ./src ./webpack_config --ignore-pattern dist",
Expand Down
21 changes: 0 additions & 21 deletions src/server/config/index.js

This file was deleted.

1 change: 0 additions & 1 deletion src/server/config/ssl/readme.md

This file was deleted.

14 changes: 2 additions & 12 deletions src/server/index.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,16 @@
* @file
*/
import express from 'express'
import http from 'http'
import spdy from 'spdy'
import chalk from 'chalk'
// Mount our server-side code to dev server
// Mount our server-side code to server
import server from '../../webpack_config/devServer'
import {serverOptions as options} from './config'

const app: express$Application = express()
const httpsPORT: number = +process.env.HTTPS_PORT || 3030
const httpPORT: number = +process.env.HTTP_PORT || 3000

server(app)

spdy.createServer(options, app).listen(httpsPORT, () => {
console.log(
chalk.red(`HTTPS SERVER IS LISTENING ON https://127.0.0.1:${httpsPORT}`)
)
})

http.createServer(app).listen(httpPORT, () => {
app.listen(httpPORT, () => {
console.log(
chalk.green(`HTTP SERVER IS LISTENING ON http://localhost:${httpPORT}`)
)
Expand Down
14 changes: 2 additions & 12 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,16 @@
* @file
*/
import express from 'express'
import http from 'http'
import spdy from 'spdy'
import chalk from 'chalk'
// Mount our server-side code to server
import server from './server'
import {serverOptions as options} from './config'

const app: express$Application = express()
const httpsPORT: number = +process.env.HTTPS_PORT || 3030
const httpPORT: number = +process.env.HTTP_PORT || 3000
const httpPORT: number = +process.env.HTTP_PORT

server(app)

spdy.createServer(options, app).listen(httpsPORT, () => {
console.log(
chalk.red(`HTTPS SERVER IS LISTENING ON https://127.0.0.1:${httpsPORT}`)
)
})

http.createServer(app).listen(httpPORT, () => {
app.listen(httpPORT, () => {
console.log(
chalk.green(`HTTP SERVER IS LISTENING ON http://localhost:${httpPORT}`)
)
Expand Down

0 comments on commit 0d8ddb5

Please sign in to comment.