Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
router.get('/', (req, res) => {
const currentLambdaInvoke = getCurrentLambdaInvoke()
res.render('index', {
apiUrl: currentLambdaInvoke ? `https://${currentLambdaInvoke.event.multiValueHeaders.host[0]}/${currentLambdaInvoke.event.requestContext.stage}` : 'http://localhost:3000'
})
})