https://www.pairprogrammingtimer.com
Keep time and turn order when you are pair programming, you can find the server code here.
- Branch from
master - Make your changes
- Ensure you pass all the tests prompted by Husky's git hooks
- Merge back into
master - Deploy by tagging a release on github
Svelte- A component framework which runs at build time with no virtual DOM. Svelte converts components into highly efficient imperative code that surgically updates the DOM more details.Kubernetes- An open-source system for automating deployment, scaling, and management of containerized applications.Docker- Docker is a software platform that allows you to build, test, and deploy applications. Docker packages software into standardized units called containers that have everything the software needs to run.Rollup- module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.Jest- JavaScript Testing Framework with a focus on simplicity.Eslint- static code analysis tool for identifying problematic patterns found in JavaScript code.Husky- git hooks.scripts/- build and deploy bash scripts.
Install kubectl from here
Set up credentials to a kubernetes cluster.
Install the dependencies and run locally...
-
npm install -
npm run dev- for local developement -
npm start- for production
NOTE - By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the
sirvcommands in package.json to include the option--host 0.0.0.0.
*Environment varibales such as the SERVER_ADDR can be found in rollup.config.js
npm run build- Compile the codenpm run lint- Run linternpm run test- Run all testsnpm run test:watch- Run tests continuouslyscripts/deploy.sh $VERSION_NUMBER- Deploys any changes to kubernetes` manifests, builds a new docker image, pushes it to docker hub and finally scales the deployment to pull the newly created image.scripts/deploy_kubernetes_config.sh- Deploys just kubernetes manifest changes (kubernetes secret is excluded from the script).scripts/push_docker.sh $VERSION_NUMBER- Builds and pushes the code to dockerhub with a $VERSION_NUMBER as a tag.
To deploy to production tag a release on master branch
Manual deployment is driven by bash scripts found in scripts/. You must currently cd into scripts/ to execute them.
To deploy your changes manually run (see "Useful Commands" for details):
./scripts/deploy.sh $VERSION_NUMBER
NOTE - If you deploy manually and you change the VERSION_NUMBER of the docker image you must manually change the associated tag in
.kubernetes/deployment.yaml. Usescripts/deploy_kubernetes_config.shfor updating just k8 config.