Hi, is it possible to export/import REST mappings ...
# box-products
f
Hi, is it possible to export/import REST mappings using cfconfig? I just found this question from 2019 with no answer: https://dev.lucee.org/t/commandbox-cfconfig-and-rest/5441 I need to import REST mapping using a configuration file and I also did not find anything in the commandbox docs. Thanks
b
Hi @Fritz thanks for pointing out that thread. I would have replied to it if I had seen it
The answer is no, I've never added REST support for Lucee in CFConfig. Mainly because I don't personally use it (we built our REST APis in ColdBox! šŸ’Ŗ ), no one has ever offered to sponsor the addition of it, and no one has never sent me a pull request to add support for it!
It's probably not too hard to add support for, so I'd encourage you to take a stab if you like-- CFConfig is all written in CFML šŸ™‚
f
Haha, ok šŸ˜‰ Understood. Looks like I'm the last one not (yet) using any box product šŸ™ˆ but just vanilla lucee docker images and we did all our config in Dockerfile steps and I wanted to take a look on how to migrate to box and my first thing I wanted to migrate was the REST mappings šŸ˜‰ So, bad luck for me ^^ Maybe I can be of help in the future with that, but first I need to get my first steps at all trying to understand the box universe. Cheers
b
I replied on that thread as well. Thx again for pointing it out
šŸ‘ 1
Defo look at the CommandBox powered docker images. They are far more pwerful and easier to configure than the "official" Lucee or Adobe images
Which is mostly due to them using CommandBox which consolidates nearly all config into •
server.json
JSON file • CFConfig for anythigng in the admin (with a few exceptions such as REST) • Env var overrides for just about anythign
You can get your feet wet with CommandBox here https://commandbox.ortusbooks.com/getting-started-guide And servers specifically here: https://commandbox.ortusbooks.com/embedded-server And here is a slide deck aimed at server management and deployment with CommandBox and its modules https://www.slideshare.net/ortussolutions/itb2019-scaling-with-commandbox-in-production-brad-wood
f
Thanks Brad, will have a look at it! Cheers!
šŸ‘šŸ» 1
šŸ‘ 1
l
or you can use ColdBox!! All your mappings and routes are source controlled
in a single router or a modular router
We can help if needed to convert it
šŸ‘ 1