{"id":21481005,"url":"https://github.com/cyan903/lua-url-shortener","last_synced_at":"2025-03-17T09:12:57.967Z","repository":{"id":173258170,"uuid":"418071137","full_name":"Cyan903/lua-url-shortener","owner":"Cyan903","description":"URL shortening API written in lua. Similar to how bit.ly works.","archived":false,"fork":false,"pushed_at":"2021-10-20T03:49:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T18:48:46.266Z","etag":null,"topics":["api","bitly-clone","lua","lua-http","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Cyan903.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":"2021-10-17T08:55:07.000Z","updated_at":"2022-09-10T15:33:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"aefc33d7-fd10-4137-b68f-b15486b7a4d2","html_url":"https://github.com/Cyan903/lua-url-shortener","commit_stats":null,"previous_names":["cyan903/lua-url-shortener"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyan903%2Flua-url-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyan903%2Flua-url-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyan903%2Flua-url-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyan903%2Flua-url-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyan903","download_url":"https://codeload.github.com/Cyan903/lua-url-shortener/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006398,"owners_count":20382443,"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","bitly-clone","lua","lua-http","url-shortener"],"created_at":"2024-11-23T12:19:58.950Z","updated_at":"2025-03-17T09:12:57.955Z","avatar_url":"https://github.com/Cyan903.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lua-url-shortener\n\n![total lines](https://img.shields.io/tokei/lines/github/CyanPiano/lua-url-shortener) ![last commit](https://img.shields.io/github/last-commit/CyanPiano/lua-url-shortener) ![repo size](https://img.shields.io/github/repo-size/CyanPiano/lua-url-shortener)\n\nURL shortening API written in lua. Similar to how [bit.ly](https://bitly.com/) works. This isn't meant to be a serious project and I made it mostly for getting better at the language. This api won't scale at all and I probably spent more time writing helper functions than actually writing the api.\n\n## Installation\nThis api requires MySQL (or MariaDB) to be installed and configured. First install the required luarocks.\n```sh\n$ luarocks install http\n$ luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysql # or wherever you have your mysql dir.\n$ luarocks install json-lua\n```\n\nExecute `ext/db.sql`.\n```\n$ mysql -u user -p\nmysql\u003e source /path/to/api/ext/db.sql;\n```\n\nCopy and configure `config.json`.\n```sh\n$ cp ext/config.sample.json ./config.json\n$ nano config.json\n```\n\nFinally, run the api with:\n```sh\n$ lua app.lua\n```\n\n## Dependencies\n`rxi/log.lua` and `golgote/neturl` don't exist on luarocks and are installed in the `/lib` directory.\n\n- [rxi/log.lua](https://github.com/rxi/log.lua)\n- [keplerproject/luasql](https://github.com/keplerproject/luasql/)\n- [daurnimator/lua-http](https://github.com/daurnimator/lua-http)\n- [jiyinyiyong/json-lua](https://github.com/jiyinyiyong/json-lua)\n- [golgote/neturl](https://github.com/golgote/neturl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyan903%2Flua-url-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyan903%2Flua-url-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyan903%2Flua-url-shortener/lists"}