{"size": 812, "ext": "js", "max_stars_repo_path": "frontend/landing/src/server.js", "max_stars_repo_name": "hosseinnedaee/fullstack-javascript-architecture", "max_stars_repo_stars_event_min_datetime": "2020-05-14T13:10:29.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-14T13:10:29.000Z", "max_issues_repo_path": "frontend/landing/src/server.js", "max_issues_repo_name": "hosseinnedaee/fullstack-javascript-architecture", "max_issues_repo_issues_event_min_datetime": "2021-05-11T14:03:56.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T11:15:50.000Z", "max_forks_repo_path": "frontend/landing/src/server.js", "max_forks_repo_name": "kostasleloudas1989/fullstack-javascript-architecture", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 21.9459459459, "max_line_length": 60, "alphanum_fraction": 0.6169950739}
// Imports
import express from 'express'
import { render } from '@jaredpalmer/after'

// App Imports
import routes from './setup/routes'
import Document from './modules/common/Document'

// Server
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST)

const server = express()
server
  .disable('x-powered-by')
  .use(express.static(process.env.RAZZLE_PUBLIC_DIR))
  .get('/*', async (req, res) => {
    try {
      const html = await render({
        req,
        res,
        document: Document,
        routes,
        assets,
        // Anything else you add here will be made available
        // within getInitialProps(ctx)
        // e.g a redux store...
        customThing: 'thing',
      })

      res.send(html)
    } catch (error) {
      await res.json(error)
    }
  })

export default server
