Introduction
Monstarillo is a template based code generator that works against Postgres, MySQL and Oracle.
This tutorial will get you familiar with running templates against a database with Monstarillo. To complete this tutorial you will need to have Monstarillo installed and a postgres database. I will be running postgres in Docker for this tutorial.
In this tutorial we will be generating markdown files that detail some information about the tables in the database. We will put the files in a folder named postgres-chinhook-db-md. We will be generating a file for each table in the database. Our output will look like the image below.
The first step is to clone the Monstarillo/monstarillo-templates repo. The repo contains the template we will be running and the files needed to set up the chinhook database that we will be using.
git clone https://github.com/monstarillo/monstarillo-templates
The database information is located in the chinhook-db folder of the repo. Follow the instructions in the readme.md to stand up the database.