Repository Templates

Repository Templates for New BookNest Services

A second BookNest service should start with the first one's Node.js 2,131 version, Git 1,932 settings, license, tests and health endpoint. A template repository captures that starting point: Use this template creates a new repository with the template's files in one fresh commit, with none of its history and no link back to it (unlike a fork). Only the default branch is copied unless you tick Include all branches.

The template, booknest-service-template, is a ten-file Express 24,430 skeleton with a /health route, two node --test tests, and BookNest's .gitignore, .nvmrc and LICENSE. Publish it, mark it as a template, and create a new service from it:

Publishing a template repository and generating a service from itShell
gh repo create booknest-service-template --public --source . --push \
  --description "Template for new BookNest services"
gh repo edit --template
cd ..
gh repo create booknest-reviews --public --clone \
  --template binarybehemoth/booknest-service-template
git -C booknest-reviews log --oneline
Output
✓ Created repository binarybehemoth/booknest-service-template on github.com
  https://github.com/binarybehemoth/booknest-service-template
...
✓ Pushed commits to https://github.com/binarybehemoth/booknest-service-template.git
✓ Edited repository binarybehemoth/booknest-service-template
✓ Created repository binarybehemoth/booknest-reviews on github.com
  https://github.com/binarybehemoth/booknest-reviews
Cloning into 'booknest-reviews'...
458cbc9 Initial commit

The generated repository's only commit is "Initial commit", made by the account that clicked the button, not by Sam, whose commit built the template. A template carries files, not settings, so keep issue forms (Issue Forms and Templates) in it and rely on organization-wide rulesets (Organization-Wide Rulesets) for protection.