{"id":26600759,"url":"https://github.com/btbytes/simplestatapp","last_synced_at":"2025-10-28T17:40:16.434Z","repository":{"id":252592830,"uuid":"840884666","full_name":"btbytes/simplestatapp","owner":"btbytes","description":"Simple Web application to illustrate statically linked nim application built as a docker image \u003c6MB","archived":false,"fork":false,"pushed_at":"2024-08-11T17:21:22.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T00:16:54.436Z","etag":null,"topics":["nim-lang"],"latest_commit_sha":null,"homepage":"https://simplestatapp.fly.dev","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btbytes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-11T01:42:23.000Z","updated_at":"2024-09-25T20:09:45.000Z","dependencies_parsed_at":"2024-08-11T02:48:01.313Z","dependency_job_id":"939651c2-4573-4516-ab36-b2407ac71ae2","html_url":"https://github.com/btbytes/simplestatapp","commit_stats":null,"previous_names":["btbytes/simplestatapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fsimplestatapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fsimplestatapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fsimplestatapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fsimplestatapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btbytes","download_url":"https://codeload.github.com/btbytes/simplestatapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245151629,"owners_count":20569299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nim-lang"],"created_at":"2025-03-23T18:34:51.596Z","updated_at":"2025-10-28T17:40:11.370Z","avatar_url":"https://github.com/btbytes.png","language":"Nim","readme":"# Simple Static Application\n\nThis is an illustrative example of how to build statically linked nim application\nthat produce very small single exeuctables (in the order of few MBs).\n\nThis application uses [Nim Language](//nim-lang.org), which compiles down to C, and subsequently to\na small, performant, standalone binary.\n\nThis simple web application uses the [Prologue](https://planety.github.io/prologue/) web framework\nto present the table at the bottom of the page, which is data rendered from reading the\n`students.db` SQLite database, which has a single table \"users\" with 10 dummy student records.\n\nThe table is the result of querying the sqlite database on every request and rendering\nit as an HTML table.\n\nIn order to present this page, the following dependencies were statically linked:\n\n1. SQLite3\n1. PCRE\n\nand the following nim libraries were also compiled in:\n\n1. `prologue` (and all it's dependencies)\n1. `db_connector`\n1. `markdown`\n\nThe resulting standalone docker image is a mere 5.64mb all dependencies included.\n\n```\n$ docker image ls simplestatapp\nREPOSITORY      TAG       IMAGE ID       CREATED         SIZE\nsimplestatapp   latest    9d3dc3a9cc58   3 minutes ago   5.64MB\n```\n\nYou can see also see the image size during this [fly.io](//fly.io) deployment.\n\n![fly.io deployment image size](//files.btbytes.com/images/2024/08/simplestatapp-flyio.webp)\n\nThe code for this application is at \u003chttps://github.com/btbytes/simplestatapp/\u003e, and hosted on\nfly.io - \u003chttps://simplestatapp.fly.dev/\u003e\n\nIf you are curious about all the things that get added, built, and copied, you can inspect the `Dockerfile`\nor take a look at the actual docker build [with github actions](https://github.com/btbytes/simplestatapp/actions/runs/10336115562/job/28611490435).\n\nAnd without much ado, the table:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Fsimplestatapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtbytes%2Fsimplestatapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Fsimplestatapp/lists"}