mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
Add config.js, dockerfile
This commit is contained in:
1 parent
4ffdb5d627
commit
2dffd2f74d
5 files changed
+48
-4
No files matched your search
+3
-3
@@ -8,9 +8,9 @@ import socketServer from './api/socket.js'
|
||||
import connectDB from './db.js'
|
||||
import apiRouter from './api/routes/index.js'
|
||||
import loadAndUpdateQuests from './utils/quest.js'
|
||||
import config from './config.js'
|
||||
|
||||
async function main() {
|
||||
const port = 3000
|
||||
const app = express()
|
||||
const server = http.createServer(app)
|
||||
socketServer(server)
|
||||
@@ -28,8 +28,8 @@ async function main() {
|
||||
|
||||
app.use('/api/v1', apiRouter)
|
||||
|
||||
server.listen(port, () => {
|
||||
console.log(`Server listening at http://localhost:${port}`)
|
||||
server.listen(config.port, config.host, () => {
|
||||
console.log(`Server listening at http://${config.host}:${config.port}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user