Clone - keepcoding-tech/ctrl_nest GitHub Wiki
This page walks you through cloning and setting up the project.
If you haven't already danced through the Install Tools steps, please shimmy back and make sure you're all caught up - this guide assumes you're ready to roll.
Clone Repository
Find yourself a directory — somewhere you’ve got write permissions — and clone away:
git clone https://github.com/keepcoding-tech/ctrl_nest.git
Voilà! You've now summoned the code onto your machine.
Set ENV Variables
Open up your .bashrc
(or .zshrc
, depending on your shell flavor), and tack this on the end:
# === CtrlNest ==========================================================
# Mojolicious
export MOJO_SECRETS="SUPER_SECRET_STRING"
# PostgreSQL
export DBI_DSN="dbi:Pg:dbname=mydb"
export DBI_USER="myuser"
export DBI_PASS="mypass"
# =======================================================================
Then reload your shell config:
source ~/.bashrc
or
source ~/.zshrc
Install Dependencies
From inside the project folder (cd ctrl_nest
), run:
carton install
Grab a coffee — this may take a while, but you only need to run this once.
From now on, when running any commands that use those dependencies, prefix with:
carton exec
Deploy the Schema
This command will create all the tables needed to bring the app to life:
carton exec -- perl script/db_handler.pl install
Assuming your PostgreSQL is set up properly (go back if it’s not), this will do the trick.
And that's it — Happy coding!