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

Commit

Permalink
fix(server): move server creation to ./server/index
Browse files Browse the repository at this point in the history
fix(server): move server creation to ./server/index
  • Loading branch information
Metnew committed Feb 18, 2018
1 parent 5c42199 commit 2eefb8f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
23 changes: 23 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @flow
* @file
*/
import 'babel-polyfill'
import express from 'express'
import fetch from 'isomorphic-fetch'
import addMiddlewares from './middlewares'
import API from './api'
import SSR from './ssr'

global.fetch = fetch

const app: express$Application = express()

// Add global middlewares
addMiddlewares(app)
// Add API
app.use('/api', API)
// Add SSR
app.use(SSR)

export default app
27 changes: 0 additions & 27 deletions src/server/server.js

This file was deleted.

0 comments on commit 2eefb8f

Please sign in to comment.