I am struggling to setup a simple REST service usi...
# lucee
d
I am struggling to setup a simple REST service using Lucee 5.3.9.115-RC. In the server context I have a mapping, which seems to be showing in red for some reason, though it is a valid path. When I try to hit the endpoint it gives me a 404. The cfc is definitely in the right folder and has the correct restpath
I also get a 404 hitting /rest/ and have 'list services' turned on
a
Write a quick .cfm script that does a
directoryExists
on that dir. Just cos it exists in the file system and your user can see it, doesn't mean the user Lucee is using can also see it. Does Lucee not give any hint as to why it's showing as red if you hover over it?
d
directoryExists
returns true It doesnt give me any indication when I hover over the table, I tried checking the source code and there are no hints in there either
also did a
fileRead
on one of the CFCs and that was ok
Ive tried also with a fresh server, just using
server start test-api
, then I copied the CFCs to a folder in the Lucee users home directory, same thing, Lucee version 5.3.8.206
a
Do me a favour... try to use fwd slashes as the path separator instead?
It hasnt changed the red boxes in the UI, but I seem to be able to get to the Lucee rest services now
a
Just a question: did you go through the example in https://docs.lucee.org/guides/Various/rest-services.html
d
Yeah, sorry I figured it out, it was commandbox in the end, it defaults to turning off the rest services and they need to be enabled.
a
Shouldn't it "default" to "not meddling with stuff"?
👍 1