Tried two times as described in every step in the 60 minute
ending on this page:
Here’s the information
Routed URL: api/contacts/
Layout: N/A (Module: )
Timestamp: 01/22/2019 03:54:41 PM
Did you add the /api/contacts route to your routes file and have you reinitted the framework since then?
Thanks for the quick response
I believe I did everything letter for letter, reinit and restarted the server here’s my router.cfc.
The first time through I installed some things and was guessing at issues to debug. So I did the whole thing without diverging from anything.
The only difference from the 60 minute walk through is that I’m using cf 2016 server
setFullRewrites( true );
route( “:handler/:action?” ).end();
route( pattern="/api/contacts", target=“contacts.index”, name=“api.contacts” );
That’s the issue. Routes are matched in the order declared. You need to make sure the default route is always last in the file. Otherwise, it gets matched first and ColdBox will never even look at your custom route. Just switch the order of those two lines. We should probably add a note to this affect in this guide.
Thanks a ton, working my way through the docs. Looks nice so far.