mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix: migrate old schema to new
This commit is contained in:
parent
0fa19bb6ad
commit
4fd05e15b4
6 changed files with 108 additions and 42 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const express = require('express');
|
||||
const dbConnect = require('../models/dbConnect');
|
||||
const { migrateDb } = require('../models');
|
||||
const path = require('path');
|
||||
const cors = require('cors');
|
||||
const routes = require('./routes');
|
||||
|
|
@ -7,7 +8,10 @@ const app = express();
|
|||
const port = process.env.PORT || 3080;
|
||||
const host = process.env.HOST || 'localhost'
|
||||
const projectPath = path.join(__dirname, '..', '..', 'client');
|
||||
dbConnect().then(() => console.log('Connected to MongoDB'));
|
||||
dbConnect().then(() => {
|
||||
console.log('Connected to MongoDB');
|
||||
migrateDb();
|
||||
});
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue