question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do I miss something?

<script>
    router = new Navigo(null, false);
    router.on({
      'about': () => { console.log('about'); },
      'home': () => { console.log('home'); },
      'contact': () => { console.log('contact'); }
    });
    router.resolve();
  </script>

I don’t want to use hash (# or #!) I just want some thing like this: http:// [site-url:port]/about But that says: The requested URL /navigo/about was not found on this server. navigo/about doesn’ exists, is right, but I just want that the console says ‘about’ and not redirect to other page, I was specting that navigo resolve that URI. How can I use navigo to do that?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
michel-reyescommented, Aug 29, 2018

Already fixed, in webpack-dev-server I just add this

module.exports = {
  devServer: {
    historyApiFallback: true,
  },

When using the HTML5 History API, the index.html page will likely have to be served in place of any 404 responses

And everything works perfect. Thansk a lot krasimir for your time, explanation and help

1reaction
krasimircommented, Aug 29, 2018

Actually it doesn’t matter as long as all the requests go to the same page where navigo operates. Navigo is a client-side library. It doesn’t work on the server yet. You mention The requested URL /navigo/about was not found on this server which makes me think that your server-side server code is not catching the URL and it is not serving your html (where navigo operates)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does No No Hair Remover Work - Consumer Reports
No No, which has low, medium, and high treatment levels, removes hair with a heated wire that stays above the skin. It can...
Read more >
no!no! Hair Removal Treatment System
The only heat-based hair removal treatiment that works above and below the skin's surface. Completely painless and non-invasive hair removal.
Read more >
Customer reviews: no!no! PRO Hair Removal Device, Platinum
I am experimenting with one NoNo leg and one shaved leg. So far on my face it seems to be working. Sure don't...
Read more >
No!no! hair removal system 8800 Series Reviews 2022
No no works really well at removing hair but it does take a lot of time to remove ALL the hair. I found...
Read more >
Does the no!no! hair removal system work? Watch our video ...
Similar to laser treatments, the device uses 'Thermicon' technology that heats hair down to the follicle to both remove it and inhibit future ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found