Skip to content

Commit

Permalink
minor lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Jul 15, 2019
1 parent 59d3855 commit 6009e99
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@ global.Intl = intl; // polyfill for ios 9

export default (server) => {
server
.register(require('./routes').default)
.static(process.env.RAZZLE_PUBLIC_DIR)
.get(
'/*',
{
isRaw: true
},
(req, res) => {
const APP_TITLE = process.env.APP_TITLE || 'Razzle Dev Env';
const context = {};
.register(require('./routes').default)
.static(process.env.RAZZLE_PUBLIC_DIR)
.get(
'/*',
{
isRaw: true
},
(req, res) => {
const APP_TITLE = process.env.APP_TITLE || 'Razzle Dev Env';
const context = {};

const markup = renderToString(
<Provider store={require('../client/redux/store').store}>
<App
router={StaticRouter}
location={req.getUrl()}
context={context}
/>
</Provider>
);
const markup = renderToString(
<Provider store={require('../client/redux/store').store}>
<App
router={StaticRouter}
location={req.getUrl()}
context={context}
/>
</Provider>
);

if (context.url) {
res.writeHeader('Location', context.url);
res.writeStatus('301 Moved Permanently');
res.end();
return;
}
if (context.url) {
res.writeHeader('Location', context.url);
res.writeStatus('301 Moved Permanently');
res.end();
return;
}

res.end(
res.end(
// prettier-ignore
`<!doctype html>
`<!doctype html>
<html lang="">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Expand All @@ -60,7 +60,7 @@ export default (server) => {
<script src="${assets.client.js}" defer crossorigin></script>
</body>
</html>`
);
});
return server;
}
);
});
return server;
};

0 comments on commit 6009e99

Please sign in to comment.