FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...
Preside REST Skeletonv1.0.5 Public
A skeleton Preside application to be used as a starting point for a REST API application.
This package should be installed using the
preside new site command from CommandBox rather than directly. See Preside Commands.
There are 4 dependencies in form of Preside extensions that are automatically setup for you via CommandBox box.json
To get you up and running quickly here is a sample scenario of what you would do to start using the REST skeleton:
Use CommandBox to setup your site
mkdir myApiProject --cd preside new site
Follow the wizard, use for example:
Create an empty database schema in mysql or mariadb that can be used by Preside.
Use CommandBox to start the server (make sure that you are in your apps root dir)
Setup MySQL datasource now [Y/n]? y enter DB info (name, user, server, etc.)
You should now see a blank homepage.
Access the Preside Admin by appending /admin to the URL, e.g. http://127.0.0.1:12345/admin If you chose a different admin path in the wizard, append that accordingly. If you forgot what admin path you took or want to change it now, you can do that in the Config.cfc of your project.
Setup the sysadmin (super user that can do everything in the admin) by entering an email address and password. Login using username sysadmin and the password you just entered
Have a look in the Config.cfc and enable features as required.
Check out the system settings in the Preside Admin (Rest Security, Rest i18n, Rest Swagger)
Have a look at the generated Swagger spec and the Swagger UI - both have quick links from the Admin.
If you have defined some Preside objects you can quickly scaffold basic REST endpoints for those. Use the Preside developer terminal for that.
Have fun trying out Preside goodness, explore the existing code and customize to your desire.
Feel free to fork and contribute. Feedback is welcome - probably best on the Preside Slack.
box install preside-skeleton-rest