{"id":18918884,"url":"https://github.com/ullenius/minihopp","last_synced_at":"2026-03-12T09:30:17.719Z","repository":{"id":131063087,"uuid":"171521128","full_name":"ullenius/minihopp","owner":"ullenius","description":":earth_asia: :rabbit: Java URL Shortener microservice (REST webservice). SQL and NoSQL (Redis) support.  To be deployed on a Java application server such as Wildfly","archived":false,"fork":false,"pushed_at":"2020-10-13T15:13:42.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T15:54:17.723Z","etag":null,"topics":["freecodecamp-backend","java8","javaee8","json","mit-license","nosql","redis","rest-api","sql"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ullenius.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":"2019-02-19T17:47:33.000Z","updated_at":"2020-10-13T15:13:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"9146e386-89c9-4ccc-8d1a-a281f777d980","html_url":"https://github.com/ullenius/minihopp","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/ullenius%2Fminihopp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fminihopp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fminihopp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fminihopp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ullenius","download_url":"https://codeload.github.com/ullenius/minihopp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239914929,"owners_count":19717760,"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":["freecodecamp-backend","java8","javaee8","json","mit-license","nosql","redis","rest-api","sql"],"created_at":"2024-11-08T10:34:11.705Z","updated_at":"2026-03-12T09:30:17.666Z","avatar_url":"https://github.com/ullenius.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniHopp URL Shortener\n\nA Java URL Shortener microservice. SQL and NoSQL ([Redis](https://github.com/redis)) support.\n\nIt's my implementation of freeCodeCamp's project.\n\nMiniHopp:rabbit: is named after Lille Skutt's son in the Swedish comic Bamse.\n\n## Some features\n* 100% Java :coffee:\n* REST web microservice\n* Supports SQL (using JPA and object-relational mapping)\n* NoSQL support (using Redis)\n* JSON\n\n\n## Usage\n\n`POST [project_url]/minihopp/` to obtain a JSON-object containing the Short URL and the original long format URL.\n\n`GET [project_url]/minihopp/short_url_id` to be re-directed to the corresponding URL.\n\n### JSON format:\n```\n{\n  \"short_url\": 2,\n  \"original_url\": \"https://www.github.com/ullenius\"\n}\n```\n\n## Development\nMiniHopp uses various tools to ease the development process\n* Maven is used to resolve dependencies and build MiniHopp\n* Jedis is used for Redis-support\n* Java EE 8 is used for SQL (EclipseLink)\n* RestEasy is used for JAX-RS\n* First release was 2019-02-19\n\n## Building\nRun\n```\nmvn package\n```\nto build the WAR-file.\n\n* You need to set up your database manually through your application server of choice. \n\n* The JNDI-name is: *'java:/MiniHoppDatabase'*\n\n* MiniHopp works fine using WildFly.\n\n## Using Redis\nMiniHopp uses Jedis as its Redis-client. By default the SQL-implementation is\nused (dependency injection). To use the Redis implementation simply swap the \n```\n@Default\n@Alternative\n```\nannotations in `RedisShortURL.java` and `SQLShortURL.java`\n\n* Redis uses *localhost* as the default hostname\n* The standard Redis database is used (#0)\n* If you wish to use a remote Redis-server I suggest tunneling it through SSH\nthat is: `ssh -v -L 6379:localhost:6379 REDIS_SERVER -N`\n\n## Author\nCreated and written by A.D Ullenius \u003canosh@anosh.se\u003e in 2019. See LICENCE\n\n\n## Contributing\nIf you have added a feature or fixed a bug in MiniHopp please submit a pull request as follows:\n\n* Fork the project\n* Write the code for your feature or bug fix\n* Commit and do not mess with version or history\n* Submit a pull request\n\nThanks for sharing!\n\n### Full project description\n[freeCodeCamp source](https://thread-paper.glitch.me/) - read 2019-02-13\n\nAPI Project: URL Shortener Microservice\nUser Story:\n\n    I can POST a URL to [project_url]/api/shorturl/new and I will receive a shortened URL in the JSON response.\n    Example : {\"original_url\":\"www.google.com\",\"short_url\":1}\n    If I pass an invalid URL that doesn't follow the http(s)://www.example.com(/more/routes) format, the JSON response will contain an error like {\"error\":\"invalid URL\"}\n    HINT: to be sure that the submitted url points to a valid site you can use the function dns.lookup(host, cb) from the dns core module.\n    When I visit the shortened URL, it will redirect me to my original link.\n\nShort URL Creation\n\nexample: `POST [project_url]/api/shorturl/new - https://en.wikipedia.org/wiki/Main_Page`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullenius%2Fminihopp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullenius%2Fminihopp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullenius%2Fminihopp/lists"}