Skip to content

Commit

Permalink
update deploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Sep 6, 2024
1 parent 766f19b commit f22455e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ export const config: Config = {
size: 300,
},
cookie: { expiresAfterDays: 1, name: 'authorized' },
verifServerUrl: process.env.NODE_ENV === 'production' ? 'https://prndog-server.fly.dev' : 'http://localhost:3000',
verifServerUrl: process.env.NODE_ENV === 'production' ? 'https://dog18.fly.dev' : 'http://localhost:3000',
}
12 changes: 6 additions & 6 deletions server/fly.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# fly.toml app configuration file generated for prndog-server on 2024-09-06T12:47:41+02:00
# fly.toml app configuration file generated for dog18 on 2024-09-06T14:57:57+02:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'prndog-server'
app = 'dog18'
primary_region = 'ams'

[env]
NODE_ENV = 'production'
HOST = "0.0.0.0"
PORT = "3000"
HOST = '0.0.0.0'

[build]

Expand All @@ -22,4 +20,6 @@ primary_region = 'ams'
processes = ['app']

[[vm]]
size = 'shared-cpu-1x'
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
4 changes: 2 additions & 2 deletions server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { verify } from './lib/verify'

const app = express()
const port = Number.parseInt(process.env.PORT || '3000', 10)
const host = process.env.HOST ?? 'localhost'
const host = process.env.HOST || 'localhost'

app.use(cors())
app.use(express.json())
Expand All @@ -25,6 +25,6 @@ app.post('/', async (req: Request, res: Response) => {
}
})

app.listen(port, host, () => {
app.listen(port, () => {
console.log(`Server listening at http://${host}:${port}`)
})

0 comments on commit f22455e

Please sign in to comment.