@brianclark I assume the code you have is source code for a Discourse plugin?
In that case, you can check out the guides in Developing Discourse Plugins - Part 1 - Create a basic plugin and the other tutorials in that series.
Also look at the guides in plugin-guides.