News about development on Bonsai Writer provided via a simple REST API. Actually
there's only one single GET endpoint (/news
) that provides all available news.
I developed it as an exercise for myself, as a kind of “coding kata”.
The deployed API is used by my Bonsai Writer Website Rebuild.
Run server:
deno task start
Run tests:
deno test -N
For deploying to Deno Deploy you need to setup an account first.
If you want to deploy from your local machine you can simply call
deployctl deploy
. This will open a website in your browser for authorization.
To streamline deployment you can also set the required token as an environment
variable on your machine.
Ensure that you have the necessary permissions and configurations set up in
GitHub or GitLab. This includes providing the access token from Deno Deploy as a
variable with key DENO_DEPLOY_TOKEN
.
Pushes to any branch trigger the pipeline to lint, test and deploy. Pushes to
the the main
branch are deployed to production.