Hi, I am having problem with express routes when I switch to Heroku.
I am working on a url shortener project.
The problem is that when I switch to Heroku and I go to my api route, the app also goes to the first route somehow. This does not happen locally.
I have deleted the logic code so it is easier for you to see where I am having a problem.
The route that is redirecting and accepts short url string
app.get('/:short', (req,res)=>{
console.log('redirect route')
res.send(req.path)
})
The route that accepts url
app.get('/api/:string(*)', (req,res)=>{
console.log('api route')
res.send(req.path)
})
Thanks in advance for helping.