fix: fix mongoose connection
This commit is contained in:
@ -2,9 +2,8 @@ import { logger } from '@nuxt/kit'
|
|||||||
import mongoose from 'mongoose'
|
import mongoose from 'mongoose'
|
||||||
import type { NuxtDevtoolsServerContext, ServerFunctions } from '../types'
|
import type { NuxtDevtoolsServerContext, ServerFunctions } from '../types'
|
||||||
|
|
||||||
export function setupDatabaseRPC({ nuxt }: NuxtDevtoolsServerContext): any {
|
export function setupDatabaseRPC({ nuxt, options }: NuxtDevtoolsServerContext): any {
|
||||||
// TODO:
|
mongoose.connect(options.uri, options.options)
|
||||||
mongoose.connect('mongodb://127.0.0.1:27017/arcane')
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async createCollection(name: string) {
|
async createCollection(name: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user