# README
hashworks.net source
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.