duct

czwsp 2021-03-11T04:01:46.008500Z

Hi, i am beginner in clojure and duct. I am not able to find way to wire to able handle path `/complex`  properly for my hobby project `smallshop`. I’ve set the path in `:duct.router/ataraxy`   and `init-key :smallshop.handler/complex`  in file `complex.clj` under `src/smallshop/handler` . But HTTP request to `127.0.0.1:3000/complex`  always return empty html page. I’ve been look to https://github.com/duct-framework/core/blob/28de7df11af9c95ceb157d0c5163c061a75554b3/README.md and https://circleci.com/blog/build-a-clojure-web-app-using-duct/ but cannot find clue where i am messed up. I’ve create gist for my https://gist.github.com/binilinlquad/4c5ac9db8eb4571340fdcfd27b43ed5f, https://gist.github.com/binilinlquad/c282e0a8c321c33a5423882423c6f05c, and https://gist.github.com/binilinlquad/be501f45c82c333a5668311b94bcf00b. Thank you beforehand.

kwrooijen 2021-03-11T08:33:41.008800Z

You need to change a couple of things. You don't need to create a handler as a module key. I created an example of a duct project for you that has only one endpoint :3000/simple. https://github.com/kwrooijen/duct-simple-example

kwrooijen 2021-03-11T08:34:24.009100Z

This also uses Reitit instead of Ataraxy since it's a bit better developed

czwsp 2021-03-11T12:33:47.009300Z

Thanks a lot, I successfully set it up with your sample project as reference.

czwsp 2021-03-11T12:50:34.009500Z

And thanks for point out about module. I missed the difference between module and profile.

kwrooijen 2021-03-11T13:15:53.009700Z

Here's a pretty decent overview about the configuration https://github.com/duct-framework/duct/wiki/Configuration

1👍
kwrooijen 2021-03-11T13:16:13.009900Z

Including the difference betweet base / module / profile keys

kwrooijen 2021-03-11T08:33:41.008800Z

You need to change a couple of things. You don't need to create a handler as a module key. I created an example of a duct project for you that has only one endpoint :3000/simple. https://github.com/kwrooijen/duct-simple-example

kwrooijen 2021-03-11T08:34:24.009100Z

This also uses Reitit instead of Ataraxy since it's a bit better developed

czwsp 2021-03-11T12:33:47.009300Z

Thanks a lot, I successfully set it up with your sample project as reference.

czwsp 2021-03-11T12:50:34.009500Z

And thanks for point out about module. I missed the difference between module and profile.

kwrooijen 2021-03-11T13:15:53.009700Z

Here's a pretty decent overview about the configuration https://github.com/duct-framework/duct/wiki/Configuration

1👍
kwrooijen 2021-03-11T13:16:13.009900Z

Including the difference betweet base / module / profile keys