haskell - Yesod not routing to handler -


i scaffolded yesod (yesod 1.4.1.5) application using stack tool. cannot new route work.

# config/routes /static staticr static appstatic /auth   authr   auth   getauth  /favicon.ico faviconr /robots.txt robotsr  /trails trailsr   / homer          post 

then defined following module:

-- handler/trails.hs module handler.trails  import import --import yesod.form.bootstrap3 (bootstrapformlayout (..), renderbootstrap3, --                              withsmallinput)  gettrailsr :: handler html gettrailsr = defaultlayout $     settitle "welcome yesod!"     $(widgetfile "trails") 

i made trails template file:

-- templates/trails.hamlet <h1>all trails a-z  <ul>   <li>hi 

i did not create .julius or .lucius files. matter?

and made sure put module in application.hs:

-- import relevant handler modules here. -- don't forget add new modules cabal file! import handler.common import handler.home import handler.trails 

and made sure register module in onh.cabal project, here's full library stanza:

library     hs-source-dirs: ., app     exposed-modules: application                      foundation                      import                      import.nofoundation                      model                      settings                      settings.staticfiles                      handler.common                      handler.home                      handler.trails 

then boot app such: stack exec -- yesod devel still doesn't comes 404:

$ curl -v localhost:3000/trails * hostname not found in dns cache *   trying ::1... * connect ::1 port 3000 failed: connection refused *   trying 127.0.0.1... * connected localhost (127.0.0.1) port 3000 (#0) > /trails http/1.1 > user-agent: curl/7.37.1 > host: localhost:3000 > accept: */* > < http/1.1 404 not found < transfer-encoding: chunked < date: mon, 31 aug 2015 05:00:17 gmt * server warp/3.1.2 not blacklisted < server: warp/3.1.2 

what doing wrong? how can debug routes wired correctly , hooked in build system?

you may affected bug described on mailing list. upgrading yesod-bin-1.4.14 should fix issue. can try , see if works?


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -