forked from takoserver/takos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
21 lines (20 loc) · 623 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />
import "$std/dotenv/load.ts"
import { start } from "$fresh/server.ts"
import manifest from "./fresh.gen.ts"
import config from "./fresh.config.ts"
import mongoose from "mongoose"
import { load } from "$std/dotenv/mod.ts"
/**connect mongoDB */
const env = await load()
const url = env["MONGO_URL"]
await mongoose.connect(url).then(() => {
console.log("mongo DB 接続")
}).catch((err) => {
console.log(err)
})
await start(manifest, config)