mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: docker setup & deployment
This commit is contained in:
1 parent
ad08bde4c4
commit
20927fe8aa
10 files changed
+87
-8
No files matched your search
@@ -1,3 +1,9 @@
|
||||
export default {
|
||||
const config = {
|
||||
host: process.env.HOST || 'localhost',
|
||||
port: process.env.PORT || 3001,
|
||||
db: process.env.MONGO_URL || 'mongodb://localhost:27017/odyssey-test',
|
||||
}
|
||||
|
||||
config.baseUrl = process.env.BASE_URL || `http://${config.host}:${config.port}`
|
||||
|
||||
export default config
|
||||
@@ -16,8 +16,8 @@ async function main() {
|
||||
app.use(router)
|
||||
app.use(express.static('./public'))
|
||||
|
||||
app.listen(3001, () => {
|
||||
console.log('Server started on http://localhost:3001')
|
||||
app.listen(config.port, config.host, () => {
|
||||
console.log(`Server started on ${config.baseUrl}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user