2024-01-14 20:08:59 +01:00
|
|
|
#!/usr/bin/env -S deno run -A --watch=static/,routes/
|
|
|
|
|
|
|
|
import dev from '$fresh/dev.ts'
|
|
|
|
import config from './fresh.config.ts'
|
|
|
|
|
|
|
|
import '$std/dotenv/load.ts'
|
|
|
|
|
2024-07-16 21:16:41 +02:00
|
|
|
const hostname = 'cohabit.localhost'
|
2024-07-06 17:10:14 +02:00
|
|
|
await dev(import.meta.url, './main.ts', {
|
2024-07-16 16:34:43 +02:00
|
|
|
...config,
|
|
|
|
server: {
|
2024-07-16 21:16:41 +02:00
|
|
|
cert: await Deno.readTextFile('./cert/cohabit.localhost.pem'),
|
|
|
|
key: await Deno.readTextFile('./cert/cohabit.localhost-key.pem'),
|
2024-07-16 23:52:06 +02:00
|
|
|
hostname,
|
|
|
|
onListen: (({ port }) => {
|
|
|
|
console.log(
|
|
|
|
`\n\t%c Server started %c %chttps://${hostname}:${port}\n`,
|
|
|
|
'font-weight: bold; background-color: blue',
|
|
|
|
'',
|
|
|
|
'color: blue; text-decoration: underline',
|
|
|
|
)
|
|
|
|
}),
|
2024-07-16 16:34:43 +02:00
|
|
|
},
|
2024-07-06 17:10:14 +02:00
|
|
|
})
|