FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Preside REST Skeleton

v1.0.5 Public

A skeleton Preside application to be used as a starting point for a REST API application.

Important

This package should be installed using the preside new site command from CommandBox rather than directly. See Preside Commands.

Dependencies

There are 4 dependencies in form of Preside extensions that are automatically setup for you via CommandBox box.json

Usage

To get you up and running quickly here is a sample scenario of what you would do to start using the REST skeleton:

CommandBox Package Management

Use CommandBox to setup your site

mkdir myApiProject --cd
preside new site

Follow the wizard, use for example:

  • skeleton: myApiProject
  • site-id: myApiProject
  • admin path: admin (remember this one to be able to access the admin later)
  • site name: My Awesome REST API Project
  • site author: Me

Database

Create an empty database schema in mysql or mariadb that can be used by Preside.

CommandBox Lucee Server

Use CommandBox to start the server (make sure that you are in your apps root dir)

preside start

Setup MySQL datasource now [Y/n]? y enter DB info (name, user, server, etc.)

You should now see a blank homepage.

Configuration / Initial setup

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

System configuration

Have a look in the Config.cfc and enable features as required.

System settings

Check out the system settings in the Preside Admin (Rest Security, Rest i18n, Rest Swagger)

Swagger

Have a look at the generated Swagger spec and the Swagger UI - both have quick links from the Admin.

Scaffold REST endpoints

If you have defined some Preside objects you can quickly scaffold basic REST endpoints for those. Use the Preside developer terminal for that.

Play with the code and customize the application

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.

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
1.0.5 Oct 18 2016 11:19 AM Oct 18 2016 11:19 AM
Version History
1.0.4 Oct 15 2016 04:00 AM Oct 15 2016 04:00 AM
1.0.3 Oct 14 2016 11:29 AM Oct 14 2016 11:29 AM
1.0.2 Oct 14 2016 11:23 AM Oct 14 2016 11:23 AM
1.0.1 Oct 14 2016 11:16 AM Oct 14 2016 11:16 AM

 

No collaborators yet.
 
  • Oct 14 2016 11:16 AM
  • Oct 18 2016 11:19 AM
  • 703
  • 1,324
  • 159