Fork me on GitHub

Noob question, I’m trying to figure out how handle routing/saving to a db. I’m basically trying to use ‘store-book!’ in db.clj in the interceptor ‘insert-book’ but I’m getting a 404. How bad am I butchering this?


have you tried a simpler endpoint first? GET instead of POST what's your repro? you haven't specified a curl command or such have you tried increasing the logging level? have you successfully used the official pedestal template for some quick inspiration?


(you don't need to answer these one by one - simply trying to hint how I'd solve this myself :) )


lol, yeah i’ve gone through the basic docs and made basic APIs. i’ll be toying with logging next. I’m fairly new to clojure and dev in general but I feel i’m fairly close. I’ve been attempting to work with POSTMAN and getting a 404 error. One thing I’m doing a bit differently from the examples I’ve seen is people handle the DB transactions within the interceptor. I’ve sort of decoupled that. Still going over things to figure what alls necessary.


perhaps it's related to code loading/reloading. for that reason I'd try to toy with a GET endpoint, make a small change to it and verify that code reloading effectively changes its behavior otherwise make small changes (change GET to a minimalistic POST endpoint. then add functionality to the POST) until you detect the precise source of the issue


Oh… I may not be far off. Going to test a few things. But now that i’m using restclient in emacs It’s hitting something.


Got it! it was working correctly.

🍻 2