This repo is the demo repo for the presentation given at Into the Box 2020.
The slides can be found at: https://drive.google.com/file/d/1C-__UfDdvvjpIGKtx4B_J14Z2frnJUKL/view?usp=sharing
This app works with CommandBox, it also uses a couple of CommandBox system modules which are useful in most CommandBox projects ( in box.json for simplicity ):
- CFConfig CLI - https://www.forgebox.io/view/commandbox-cfconfig
- CommandBox dotenv - https://www.forgebox.io/view/commandbox-dotenv
- CFFormat - https://www.forgebox.io/view/commandbox-cfformat
Recommened but not required:
- commandbox-cflint - https://www.forgebox.io/view/commandbox-cflint
The database needed for this is MySQL 5.7. 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.
Please copy the .env.example file into a new file you can create called .env
You could use the dotenv populate
command for a wizard to help you make that file.
Change the host, username and password of the database server you intend to use.
The box.json stores all of the dependencies of the app, these are not stored in the repo, so please use the command below to install these dependencies ( using ForgeBox behind the scenes )
box install
Once you have your .env, your db loaded, and your box.json dependencies installed, you can start your server.
box start
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
- List rants: http://127.0.0.1:60146/api/v6/rants
- Create Rants
- Read Rants
- Update Rants
- Delete Rants
http://127.0.0.1:60146/tests/runner.cfm
http://127.0.0.1:60146/cbswagger
- Import into Postman: https://www.postman.com/
- Use with Swagger.io site: https://editor.swagger.io/