hashworksNET

command module
v0.0.0-...-9d8f3ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

README

hashworks.net source

pipeline status codecov

Repository of hashworks.net.

While serving my contact information it mainly is acting as my playground for web technologies.

HTTP Handling

Nginx is used as a TLS proxy, forwarding HTTP requests to the server. Currently, I'm using gin for routing and middleware handling. Caching is handled by the gin-contrib/cache middleware, using an included memcache.

Frontend

I'm using the Go template engine to provide everything. CSS is included as inline stylesheets to avoid preloading issues, beside some exceptions for page size. I wanted to avoid absurd amounts of large requests and performance issues altogether, so I decided to strictly avoid any JavaScript and off-site requests. Any scripts are forbidden by CSP and CSS is tightly controlled as well.

Testing

Using the httptest package we can unit-test all routing endpoints quite easily. I try to keep the coverage over 85 percent.

Additionally, acceptation tests are done by the CD system (currently disabled).

Continuous Delivery (currently disabled)

GitlabCI in combination with Ansible is used as the CD system. Any commit or pull request is built, tested and provided with a coverage report. Merges on the protected master branch will be deployed after successfull unit tests. Since the server is a single binary, including all static files thanks to fileb0x this process becomes trivial. Using systemd the service is sandboxed.

After a successfully deployment acceptation tests using agouti are run. On failure a backup is restored.

Documentation

Overview

Any changes to the sassc rules need to be added to the CI configuration as well

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL