Skip to content

This repo is a demo for our presentation on building modern functional & fluent CFML REST APIs.

Notifications You must be signed in to change notification settings

lmajano/modern-functional-fluent-cfml-rest

 
 

Repository files navigation

Modern Functional & Fluent CFML REST APIs

This repo is a demo for our presentation on building modern functional & fluent CFML REST APIs.

App Setup

Install Dependencies

Just use CommandBox and install them: box install

Database setup

The database needed for this is MySQL 5.7+ or 8+. The SQL file for this project is located in the /workbench/database folder. Please use that to seed your database, and call the database fluentAPI for consistency with the .env.example file provided or you can use our migrations.

First create the database fluentapi in your MySQL database and get some credentials ready for storage:

# Seed your .env file with your db and credentials
dotenv populate

# reload the shell so the credentials are loaded
reload

# run our migrations
migrate up

Start the app

Once you have your .env, your db loaded, and your box.json dependencies installed, you can start your server.

box start

What can you do in the app?

Apart from hitting the root of the site, which is an API echo response, there are lots of things you can do with this app

http://127.0.0.1:60146/

Hit API Endpoints

View the Tests

http://127.0.0.1:60146/tests/runner.cfm

View API Docs

http://127.0.0.1:60146/cbswagger

What can you do with the API Docs?

View Route Visualizer

http://127.0.0.1:60146/route-visualizer

View CBDebugger

http://127.0.0.1:60146/cbdebugger

About

This repo is a demo for our presentation on building modern functional & fluent CFML REST APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ColdFusion 98.7%
  • Shell 1.2%
  • Dockerfile 0.1%