{"id":21970575,"url":"https://github.com/benct/tomlin-api","last_synced_at":"2026-04-09T07:37:02.679Z","repository":{"id":98422909,"uuid":"198070883","full_name":"benct/tomlin-api","owner":"benct","description":"Backend API for homepage and possibly other projects","archived":false,"fork":false,"pushed_at":"2024-07-05T22:20:25.000Z","size":345,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-28T02:26:21.354Z","etag":null,"topics":["api","gradle","kotlin","mysql","nginx","okhttp3","rest","spring-boot","tomlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-07-21T15:05:01.000Z","updated_at":"2024-07-05T22:20:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"79d0ba2d-849a-479f-86fc-3d70a7cd46af","html_url":"https://github.com/benct/tomlin-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benct%2Ftomlin-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benct%2Ftomlin-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benct%2Ftomlin-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benct%2Ftomlin-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benct","download_url":"https://codeload.github.com/benct/tomlin-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245031362,"owners_count":20549913,"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":["api","gradle","kotlin","mysql","nginx","okhttp3","rest","spring-boot","tomlin"],"created_at":"2024-11-29T14:40:20.293Z","updated_at":"2025-12-30T23:42:39.369Z","avatar_url":"https://github.com/benct.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tomlin.no API\n\nBackend API for homepage (https://tomlin.no) and possible other projects.\n\n[![Website](https://img.shields.io/website-up-down-green-red/https/api.tomlin.no.svg?label=api)](https://api.tomlin.no)\n[![GitHub last commit](https://img.shields.io/github/last-commit/benct/tomlin-api.svg)](https://github.com/benct/tomlin-api)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/benct/tomlin-api.svg)](https://github.com/benct/tomlin-api)\n[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/benct/tomlin-api.svg)](https://github.com/benct/tomlin-api)\n[![GitHub licence](https://img.shields.io/github/license/benct/tomlin-api.svg)](https://github.com/benct/tomlin-api/blob/master/LICENCE)\n\n\u003csub\u003e\u003ci\u003eAPI, Spring, Spring Boot, REST, Kotlin, Gradle, OkHttp, Nginx, MySQL\u003c/i\u003e\u003c/sub\u003e\n\n### Build and Run\n```bash\n./gradlew build\n\njava -jar build/libs/tomlin-api-1.0.0.jar --spring.profiles.active=prod\n```\n\n#### JVM Options\n```jvm\n-Dspring.profiles.active=prod\n```\n\n### Upgrade dependencies\n```bash\n./gradlew dependencyUpdates\n```\n\n### Services\nMove files under `service` directory to `/etc/systemd/system/`\n```bash\nsudo mv tomlin-api* /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable tomlin-api \u0026\u0026 sudo systemctl start tomlin-api\n```\n\n#### Restart service on file change\n```bash\nsudo systemctl enable tomlin-api-watcher \u0026\u0026 sudo systemctl start tomlin-api-watcher\nsudo systemctl enable tomlin-api-watcher.path \u0026\u0026 sudo systemctl start tomlin-api-watcher.path\n```\n\n### Certbot\n```bash\nsudo apt install certbot python-certbot-nginx\nsudo certbot --nginx\nsudo certbot renew [--dry-run]\n```\n\n### Nginx\n```bash\nsudo nano /etc/nginx/sites-available/default\nsudo nginx -t\nsudo systemctl restart nginx\n```\n\nProxy configuration:\n```\nlocation / {\n    proxy_pass http://localhost:8081/;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_set_header X-Forwarded-Port $server_port;\n}\n```\n\n### Database\n```bash\nsudo apt install mariadb-server\nmysql_secure_installation\nmysql -u root -p\n```\n\n\n### GCE\n```bash\nsudo apt update\nsudo apt uprgade\n\nsudo apt install openjdk-17-jdk\n\nsudo apt install mariadb-server\nsudo mariadb-secure-installation\nmysql -u root -p\nmysql -u root -p database_name \u003c backup.sql\n\nsudo apt install nginx\n\nchmod +x tomlin-api-1.0.0.jar\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenct%2Ftomlin-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenct%2Ftomlin-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenct%2Ftomlin-api/lists"}