{"id":13668484,"url":"https://github.com/amio/now-go","last_synced_at":"2025-05-08T00:40:24.018Z","repository":{"id":10704148,"uuid":"66638826","full_name":"amio/now-go","owner":"amio","description":"Create tinyurl/redirection service with ease.","archived":false,"fork":false,"pushed_at":"2023-01-23T20:39:15.000Z","size":675,"stargazers_count":112,"open_issues_count":12,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T18:52:32.965Z","etag":null,"topics":["micro","redirect","service","tinyurl","tinyurl-service"],"latest_commit_sha":null,"homepage":"https://go.now.sh","language":"JavaScript","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/amio.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}},"created_at":"2016-08-26T10:19:15.000Z","updated_at":"2024-05-14T15:07:21.000Z","dependencies_parsed_at":"2023-02-13T03:00:18.948Z","dependency_job_id":null,"html_url":"https://github.com/amio/now-go","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fnow-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fnow-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fnow-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fnow-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amio","download_url":"https://codeload.github.com/amio/now-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978668,"owners_count":21834910,"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":["micro","redirect","service","tinyurl","tinyurl-service"],"created_at":"2024-08-02T08:00:37.106Z","updated_at":"2025-05-08T00:40:23.989Z","avatar_url":"https://github.com/amio.png","language":"JavaScript","readme":"# now-go [![npm-version][npm-badge]][npm-link] [![install-size][pp-badge]][pp-link]\n\nCreate tinyurl/redirection service with ease.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://amio.github.io/now-go/ocelot.jpg\" /\u003e\u003cbr/\u003e\n  \u003ci\u003eNow go, let the legend come back to life!\u003c/i\u003e\n\u003c/p\u003e\n\n## Features\n\n- Lightweight tinyurl service (~50 sloc).\n- Three types of routes:\n  - __`URL`__: redirect to an url\n  - __`TEXT`__: echo a string\n  - __`FUNCTION`__: accepts `req` argument, returns `URL`/`TEXT` routes\n- Deploy to now.sh with one command.\n\n## Quick Start\n\n- cli\n  ```bash\n  npm i -g now-go\n  now-go -c path/to/config.json\n  ```\n\n- programmatically\n  ```javascript\n  const go = require('now-go')\n  const config = require('./path/to/config.json') // routes config\n\n  go(config)  // Start server on port 3000\n  ```\n\n- create http handler\n  ```javascript\n  const http = require('http')\n  const { createHandler } = require('now-go')\n\n  const config = require('./path/to/config.json')\n  const handler = createHandler(config)\n\n  http.createServer(handler).listen(3000)\n  ```\n\n## Example configs\n\n### `go-config.json`\n\n```javascript\n{\n  // 302 redirection\n  \"/\": \"https://example.com\",\n\n  // echo text\n  \"/tag\": \"Now go, let the legend come back to life!\",\n\n  // \"*\" is a special route for unmatched path\n  \"*\": \"Yet another tinyurl service.\"\n}\n```\n\n### `go-config.js`\n\n```javascript\n// redirect everything to new-example.com\nmodule.exports = {\n  \"*\": (req) =\u003e `https://new-example.com${req.url}`\n}\n```\n\n### Live Demo\n\n- https://go.now.sh and it's [index.js](example/index.js)\n\n\n## License\n\n[MIT](./LICENSE) © [Amio][author]\n\n[npm-badge]:https://badgen.now.sh/npm/v/now-go\n[npm-link]: http://www.npmjs.com/package/now-go\n[pp-badge]: https://packagephobia.now.sh/badge?p=now-go\n[pp-link]: https://packagephobia.now.sh/result?p=now-go\n[mit-link]: http://opensource.org/licenses/MIT\n[author]:   http://github.com/amio\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fnow-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famio%2Fnow-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fnow-go/lists"}