kingworld
kingworld copied to clipboard
Allow use of dynamic ports?
I was hoping something like this could be added?
import KingWorld from 'kingworld'
const server = new KingWorld()
.get('/', () => 'Hello KingWorld')
.listen(0)
console.log('🦊 KINGWORLD is running at :%s', server.port)
This would also help in this case.
import KingWorld from 'kingworld'
const server = new KingWorld()
.get('/', () => 'Hello KingWorld')
.listen(process.env.PORT ?? 0)
console.log('🦊 KINGWORLD is running at :%s', server.port)