Workshop
This workshop will walk us through creating a ColdBox
REST API using the Ortus tools. We will use CommandBox
to configure and host the API site using environment variables and cfconfig
, the ColdBox
RESTFul handler to return a standard payload, JWT authentication using cbSecurity to secure our calls, cbValidation to validate our incoming data, Swagger annotations to document our APIs, BDD Integration tests to test our API calls, and qb for creating our database tables and accessing our data. In addition, we will use PostMan to assist with development as well as ngrok to serve our APIs, allowing us to connect to each other.
The audience for this workshop is a CFML Developer who wants to build a CFML
REST API backend and secure it JWT authentication. Familiarity with CommandBox
and ColdBox would be helpful but is not required.
You will learn how to build a modern REST API using a combination of scaffolding templates, modules (cbSecurity, cbValidation, cbSwagger, cbSwagger-UI, and qb ), routing, and best practices.
This workshop will show you how you can authenticate that API and use JWT to secure the calls as well as create documentation for the APIs. In addition, you will also be able to write tests to check that your API is performing as expected.
Use questions that will test the students on their understanding of the workshop they just attended and reinforce Ortus products.
If we have time, we will also talk about nice to-haves like
Programming Knowledge: Basic knowledge of API concepts, ColdFusion. Familiarity with CommandBox and ColdBox is great.
Hardware and software: A laptop with CommandBox installed. You will need a Code Editor (VS Code or your choice of IDE), a MySQL client to connect to your database, PostMan, and ngrok (if you want to let others connect to your API).
We will be using MySQL 8, so it is recommended you have MySQL 8 installed locally or Docker to run MySql 8 Container with our Docker Compose file. You will see significant performance benefits running the database locally vs. running a remote DB, which we will provide as a backup.
Required
Preferred
Recommended VS Code Extensions
You will have all the building blocks you need and walk away with a working REST API that you can secure.
You will leave with an understanding of:
CommandBox
to host your site