mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
Load and update quests on startup
This commit is contained in:
1 parent
b2173d180d
commit
3637d41529
3 files changed
+33
-7
No files matched your search
@@ -7,6 +7,7 @@ import swaggerUI from 'swagger-ui-express'
|
||||
import socketServer from './api/socket.js'
|
||||
import connectDB from './db.js'
|
||||
import apiRouter from './api/routes/index.js'
|
||||
import loadAndUpdateQuests from './utils/quest.js'
|
||||
|
||||
async function main() {
|
||||
const port = 3000
|
||||
@@ -14,6 +15,7 @@ async function main() {
|
||||
const server = http.createServer(app)
|
||||
socketServer(server)
|
||||
await connectDB()
|
||||
await loadAndUpdateQuests()
|
||||
|
||||
const file = await fs.readFile('./swagger.yaml', 'utf8')
|
||||
const swaggerDocument = YAML.parse(file)
|
||||
|
||||
Reference in new issue
Block a user