/**
 * @flow
 * @file
 */
import express from 'express'
import spdy from 'spdy'
import chalk from 'chalk'
// Mount our server-side code to dev server
import server from '../../webpack_config/server'
import {serverOptions as options} from './config/index.dev'

const app: express$Application = express()
const PORT: number = +process.env.PORT || 3000

server(app)

spdy.createServer(options, app).listen(PORT, () => {
	console.log(chalk.green(`SERVER IS LISTENING ON ${PORT}`))
})

@@ -49,16 +49,40 @@
 xpress'%0A
+import http from 'http'%0A
 import s
@@ -208,17 +208,20 @@
 _config/
-s
+devS
 erver'%0Ai
@@ -329,16 +329,21 @@
 )%0Aconst 
+https
 PORT: nu
@@ -374,16 +374,73 @@
  %7C%7C 3000
+%0Aconst httpPort: number = +process.env.PORT %7C%7C 3000 - 443
 %0A%0Aserver
@@ -485,16 +485,21 @@
 .listen(
+https
 PORT, ()
@@ -521,21 +521,28 @@
 log(
+%0A%09%09
 chalk.
-g
 re
-en(%60
+d(%60HTTPS 
 SERV
@@ -564,17 +564,185 @@
  ON 
-$%7BPORT%7D%60)
+https://127.0.0.1:$%7BhttpsPORT%7D%60)%0A%09)%0A%7D)%0A%0Ahttp.createServer(app).listen(httpPort, () =%3E %7B%0A%09console.log(%0A%09%09chalk.green(%60HTTP SERVER IS LISTENING ON http://localhost:$%7BhttpPort%7D%60)%0A%09
 )%0A%7D)

add both https and http server in dev mode