Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

70
Views
connect-history-api-fallback vs app.get('*', [callback])

When solving SPA 404 problem, nomally use connect-history-api-fallback. but I don't know advantages of using that middleware.

app.use('/api',apiRouter);
app.get('*', (req,res) => {
    res.sendFile(path.join(__dirname,'~~'))
})

It has same result. Right?

What is the advantage of using connect-history-api-fallback?

I don't know the difference. And what kind of problems it causes.

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs