{"id":40170589,"url":"https://github.com/ilfey/go-back","last_synced_at":"2026-01-19T17:05:04.852Z","repository":{"id":61653632,"uuid":"524683864","full_name":"ilfey/go-back","owner":"ilfey","description":"Simple server for development on golang","archived":false,"fork":false,"pushed_at":"2022-12-25T16:08:03.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T09:33:26.992Z","etag":null,"topics":["development-tools","go","golang","http-server","image-generator","lorem","text-generator"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ilfey.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}},"created_at":"2022-08-14T13:45:50.000Z","updated_at":"2022-12-15T00:33:26.000Z","dependencies_parsed_at":"2023-01-30T22:15:46.153Z","dependency_job_id":null,"html_url":"https://github.com/ilfey/go-back","commit_stats":null,"previous_names":["jqweenq/go-back"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ilfey/go-back","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilfey%2Fgo-back","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilfey%2Fgo-back/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilfey%2Fgo-back/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilfey%2Fgo-back/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilfey","download_url":"https://codeload.github.com/ilfey/go-back/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilfey%2Fgo-back/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28577108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T16:29:19.148Z","status":"ssl_error","status_checked_at":"2026-01-19T16:29:17.772Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["development-tools","go","golang","http-server","image-generator","lorem","text-generator"],"created_at":"2026-01-19T17:05:04.768Z","updated_at":"2026-01-19T17:05:04.838Z","avatar_url":"https://github.com/ilfey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend for development\n\nIt's a backend for frontend development or mobile application development. This program allows you to generate random text for your applications.\n\n## How to use it?\n\nYou need to download the server and create a `.env` file or set flags when starting the server.\n\nWhat should be the file?\n\n```env\nADDRESS=0.0.0.0\nPORT=8000\nLOGLEVEL=debug\nDATABASE_URL=\"postgresql://ilfey:QWEasd123@localhost:5432/go-back\"\nDATABASE_FILE=go-back.db\nJWT_KEY=secret\nJWT_LIFE_SPAN=24\n```\n\nWhat variables are needed?\n\n* `ADDRESS` - The IP address that the server will listen on. Default: `0.0.0.0`\n* `PORT` - The port that the server will listen on. Dafault: `8000`\n* `LOGLEVEL` - Server logging level. Default: `info`\n* `DATABASE_URL` - The URL of the PostgeSQL database where users will be stored. Default: `postgresql://ilfey:QWEasd123@localhost:5432/go-back`\n* `DATABASE_FILE` - The SQLite database file. Used when it is not possible to connect to the PostgreSQL database. Default: `go-back.db`\n* `JWT_KEY` - Secret key to generate JWT. Default: `secret`\n* `JWT_LIFE_SPAN` - JWT life span in hours. Default: `24`\n\nWhat flags to set?\n\nYou can also start the server with the -h flag to see what flags exist.\nFlags will take precedence if you use flags and environment file at the same time.\n\n* `-a` - The IP address that the server will listen on. Default: `0.0.0.0`\n* `-p` - The port that the server will listen on. Dafault: `8000`\n* `-ll` - Server logging level. Default: `info`\n* `-du` - The URL of the PostgeSQL database where users will be stored. Default: `postgresql://ilfey:QWEasd123@localhost:5432/go-back`\n* `-df` - The SQLite database file. Used when it is not possible to connect to the PostgreSQL database. Default: `go-back.db`\n* `-jk` - Secret key to generate JWT. Default: `secret`\n* `-jls` - JWT life span in hours. Default: `24`\n\n## Routes\n\n|               **Route**                  |             **Description**             |\n|:-----------------------------------------|:----------------------------------------|\n| `/ping`                                  | Check authorization                     |\n| `/text/word?amount={count}`              | Returns the amount of random words      |\n| `/text/paragraph?amount={count}`         | Returns the amount of random paragraphs |\n| `/text/sentence?amount={count}`          | Returns the amount of random sentences  |\n| `/img/{width}x{height}.png`              | Returns a png image                     |\n| `/img/{width}x{height}.jpg`              | Returns a jpg image                     |\n| `/img/{width}x{height}.gif`              | Returns a gif image                     |\n| `/jwt/register`                          | Creates a new user in database          |\n| `/jwt/login`                             | Authorizes the user                     |\n| `/private/text/word?amount={count}`      | Returns the amount of random words      |\n| `/private/text/paragraph?amount={count}` | Returns the amount of random paragraphs |\n| `/private/text/sentence?amount={count}`  | Returns the amount of random sentences  |\n| `/private/img/{width}x{height}.png`      | Returns a png image                     |\n| `/private/img/{width}x{height}.jpg`      | Returns a jpg image                     |\n| `/private/img/{width}x{height}.gif`      | Returns a gif image                     |\n\n### Text endpoints\n\n`http://127.0.0.1:8000/text/word?amount=10`\n\n![word](https://imgur.com/juXNLSY.png)\n\n`http://127.0.0.1:8000/text/sentence?amount=2`\n\n![sentence](https://imgur.com/bbQa0ui.png)\n\n`http://127.0.0.1:8000/text/paragraph?amount=1`\n\n![paragraph](https://imgur.com/uolMMVx.png)\n\n### Image endpoints\n\nQuery params\n\n* `bg` - background color\n* `fg` - foreground color\n* `border` - border and diagonal width\n\nWhen setting fg or bg options you can use alpha channel: `1234` or `12345678`\n\n`http://127.0.0.1:8000/img/256x256.png?bg=121D32\u0026fg=BF3284`\n\n![256x256 image](https://imgur.com/xFDdOyE.png)\n\n### JWT endpoints\n\n`http://127.0.0.1:8000/jwt/register`\n\n![register request](https://imgur.com/myrfpJ7.png)\n\n`http://127.0.0.1:8000/jwt/login`\n\n![login request](https://imgur.com/MPj569q.png)\n\n### Ping endpoint\n\n`http://localhost:8000/ping`\n\n![ping](https://imgur.com/EGgeY0G.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filfey%2Fgo-back","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filfey%2Fgo-back","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filfey%2Fgo-back/lists"}