Of a scaffold, a safety net, and more such

For most of my POCs/experimental work, I use my own HTTP server package and a scaffold bash script that boostraps a complete API including base tests, package.json, and git init. Comes in super handy so made a change/addition to this a few days back.

Since the scaffold gets the base commits, setup done and I create the repo in parallel to continue on, added a default route that does a git pull on the repo. An unseen positive here is the fact that it is deploy-first an approach in a sense, since I need webhook end points.

The webhook created while creating the repo, keeps updating the repository as and when I push changes keeping a continuous deploy flow in place. Looking to add the following changes to this, further.

  • Instead of the current development branch as default, pick from scaffold generated config.

  • As an alternative, use an environment var to determine this between master/development/other.

  • Add this as a sensible default to the scaffold generated config.