mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
Connect to mongodb, define schemas
This commit is contained in:
1 parent
d51a75e5bc
commit
50443b96e0
13 files changed
+216
-12
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user