Connect to mongodb, define schemas

This commit is contained in:
wancat committed 2023-07-19 15:30:36 +08:00
1 parent d51a75e5bc
commit 50443b96e0
13 files changed
+216 -12

No files matched your search

+2
View File
@@ -5,11 +5,13 @@ import YAML from 'yaml'
import swaggerUI from 'swagger-ui-express'
import socketServer from './api/socket.js'
import connectDB from './db.js'
const port = 3000
const app = express()
const server = http.createServer(app)
socketServer(server)
connectDB()
const file = fs.readFileSync('./swagger.yaml', 'utf8')
const swaggerDocument = YAML.parse(file)