Now has all of the functions as the Astro site.

Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
Louis Hollingworth 2023-05-09 19:55:32 +01:00
parent 2e98cb39f4
commit f9e7e5480c
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
12 changed files with 2618 additions and 3316 deletions

View file

@ -1,9 +1,8 @@
import mongoose from 'mongoose';
const runtimeConfig = useRuntimeConfig();
import {Nitro} from 'nitropack';
import { PrismaClient } from '@prisma/client';
import { Nitro } from 'nitropack';
const prisma = new PrismaClient();
export default async (_nitroApp: Nitro) => {
mongoose.connect(runtimeConfig.mongoUri)
.then(() => console.log('connected to db'))
.catch(err => console.log('error connecting to db', err));
};