{"id":26436478,"url":"https://github.com/ranjithdb/gh-actions-nodejs-02","last_synced_at":"2025-03-18T08:17:25.396Z","repository":{"id":280118886,"uuid":"941037903","full_name":"ranjithdb/gh-actions-nodejs-02","owner":"ranjithdb","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-01T11:09:58.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T11:28:21.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ranjithdb.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":"2025-03-01T10:33:43.000Z","updated_at":"2025-03-01T11:10:02.000Z","dependencies_parsed_at":"2025-03-01T11:38:55.755Z","dependency_job_id":null,"html_url":"https://github.com/ranjithdb/gh-actions-nodejs-02","commit_stats":null,"previous_names":["ranjithdb/gh-actions-nodejs-02"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-nodejs-02","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-nodejs-02/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-nodejs-02/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-nodejs-02/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjithdb","download_url":"https://codeload.github.com/ranjithdb/gh-actions-nodejs-02/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181361,"owners_count":20411605,"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":[],"created_at":"2025-03-18T08:17:24.150Z","updated_at":"2025-03-18T08:17:25.379Z","avatar_url":"https://github.com/ranjithdb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-actions-nodejs-02\n\n## URL Shortener with GitHub Actions\n\nA simple URL shortener built with Node.js and Express.js that stores shortened URLs in a JSON file.\n\n## Features\n\n- Shorten long URLs into short links\n- Redirect users from short links to the original URL\n- Store URL mappings in a JSON file (no database needed)\n\n## Installation\n\nClone the repository\n\ninstall dependencies:\n\n```sh\nnpm ci\n```\n\n## Running the Application\n\nStart the server locally:\n\n```sh\nnpm start\n```\n\nThe server will run on `http://localhost:3000`.\n\n## API Usage\n\n### Shorten a URL\n\nTo shorten a URL, use the following curl command:\n\n```sh\ncurl -X POST http://localhost:3000/shorten \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"url\": \"https://example.com\"}'\n```\n\n#### Response\n\n```json\n{\n  \"shortUrl\": \"http://localhost:3000/abc123\"\n}\n```\n\n## Testing\n\nRun the tests using Jest:\n\n```sh\nnpm test\n```\n\n## GitHub Actions CI\n\nEvery push to `main` triggers an automated build and test using GitHub Actions.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjithdb%2Fgh-actions-nodejs-02","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjithdb%2Fgh-actions-nodejs-02","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjithdb%2Fgh-actions-nodejs-02/lists"}