Skip to content

Commit

Permalink
fix: now works on UNIX based systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunam6 committed Apr 15, 2021
1 parent 3c4ca4c commit 6c4ead2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ router
app.use(router.routes())
app.use(router.allowedMethods())

const config = {
port: Deno.env.get('PORT') != undefined ? parseInt(Deno.env.get('PORT')!) : 8000,
secure: false,
certFile: '',
keyFile: ''
}
if ((Deno.env.get('CERT_FILE')! || Deno.env.get('KEY_FILE')! != undefined) && existsSync(Deno.env.get('CERT_FILE')!) && existsSync(Deno.env.get('KEY_FILE')!)) {
config.secure = true
config.certFile = Deno.env.get('CERT_FILE')!.toString()
config.keyFile = Deno.env.get('KEY_FILE')!.toString()
}
await app.listen(config)
if ((Deno.env.get('CERT_FILE') || Deno.env.get('KEY_FILE')) != undefined && existsSync(Deno.env.get('CERT_FILE')!) && existsSync(Deno.env.get('KEY_FILE')!))
await app.listen({
port: Deno.env.get('PORT') == undefined ? 8000 : parseInt(Deno.env.get('PORT')!),
secure: true,
certFile: Deno.env.get('CERT_FILE')!,
keyFile: Deno.env.get('KEY_FILE')!
})
else
await app.listen({
port: Deno.env.get('PORT') == undefined ? 8000 : parseInt(Deno.env.get('PORT')!)
})

//TODO: http to https
//TODO: PWA
6 changes: 3 additions & 3 deletions views/all.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
outline: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
--white: #f5f5f5fa;
--gray: #f5f5f5;
--white: hsla(0, 0%, 96%, 0.98);
--gray: hsl(0, 0%, 96%);
--dark: hsla(0, 0%, 10%, 0.7);
--darker: hsl(0, 0%, 10%, 0.9);
--border: #999999;
--border: hsl(0, 0%, 60%);
}
body {
Expand Down

0 comments on commit 6c4ead2

Please sign in to comment.