mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: add register, checkUsername, update swagger
This commit is contained in:
1 parent
04a0b21cf6
commit
b55b7aa1ec
6 files changed
+118
-23
No files matched your search
+1
-2
@@ -27,6 +27,7 @@ async function main() {
|
||||
|
||||
const file = await fs.readFile('./swagger.yaml', 'utf8')
|
||||
const swaggerDocument = YAML.parse(file)
|
||||
app.use(errorHandler)
|
||||
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(swaggerDocument))
|
||||
app.use(express.json())
|
||||
|
||||
@@ -36,8 +37,6 @@ async function main() {
|
||||
|
||||
app.use('/api/v1', apiRouter)
|
||||
|
||||
app.use(errorHandler)
|
||||
|
||||
server.listen(config.port, config.host, () => {
|
||||
console.log(`Server listening at http://${config.host}:${config.port}`)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user