Giter VIP home page Giter VIP logo

Comments (5)

elithrar avatar elithrar commented on May 27, 2024

goji.get("/*", Index) is not valid and would not compile. Is that what you have, or did you mean goji.Get("/*, Index).

The error you're seeing is from React/your build process. Perhaps you also meant to have <Route path="/" component={Main} /> instead of component={Main}> ?

from goji.

Fantasim avatar Fantasim commented on May 27, 2024

Sorry i wanted to say goji.Get yes.

Error from react but i don't think thats from react only because if i put each route, its works

from goji.

zenazn avatar zenazn commented on May 27, 2024

Out of curiosity, is main.js an HTTP 404 page? Note that Goji doesn't serve files from the project's root by default—you'll have to use something like https://godoc.org/net/http#FileServer to configure Goji to serve your assets.

from goji.

Fantasim avatar Fantasim commented on May 27, 2024

Hello,

No 404 http page

from goji.

snicol avatar snicol commented on May 27, 2024

I'm using

<Route path="/" component={App}>

As well as

goji.Use(gojistatic.Static("web/public", gojistatic.StaticOptions{SkipLogging: false}))
goji.Get("/*", GetIndex)

after all my routes (just before serve) and haven't run into an issue. Take a look at your route ordering and React compilation.

from goji.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.