Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

Commit

Permalink
remove webpack (#51)
Browse files Browse the repository at this point in the history
* wip: switched to old architecture

* remove webpack completely
  • Loading branch information
MetaMmodern authored May 14, 2022
1 parent 4ae3453 commit a360103
Show file tree
Hide file tree
Showing 15 changed files with 15,424 additions and 13,486 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["airbnb-base", "prettier"],
"extends": ["airbnb", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"],
Expand All @@ -19,6 +19,7 @@
},

"env": {
"browser": true,
"node": true,
"commonjs": true,
"es6": true,
Expand Down
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ app.use(morgan('tiny', { stream: accessLogStream }));
render(app, {
root: path.join(__dirname, 'view'),
layout: false,
viewExt: 'ejs',
viewExt: 'html',
cache: false,
debug: false
});

app
.use(async (ctx, next) => {
if (ctx.get('X-Forwarded-Proto') !== 'https' && ctx.get('X-Forwarded-Port') !== '443') {
ctx.redirect(`https://${ctx.request.header.host}${ctx.url}`);
} else {
await next();
}
// if (ctx.get('X-Forwarded-Proto') !== 'https' && ctx.get('X-Forwarded-Port') !== '443') {
// ctx.redirect(`https://${ctx.request.header.host}${ctx.url}`);
// } else {
await next();
// }
})
.use(serve('dist'))
.use(serve('public'))
.use(koaBody())
.use(middleware)
.use(router.allowedMethods())
Expand Down
Loading

0 comments on commit a360103

Please sign in to comment.