{"id":13567601,"url":"https://github.com/mafintosh/taco-nginx","last_synced_at":"2025-04-14T19:43:50.164Z","repository":{"id":30665588,"uuid":"34221336","full_name":"mafintosh/taco-nginx","owner":"mafintosh","description":"Bash script that runs a service and forwards a subdomain to it using nginx when it listens to $PORT","archived":false,"fork":false,"pushed_at":"2019-01-26T16:21:01.000Z","size":23,"stargazers_count":101,"open_issues_count":2,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T11:13:05.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/mafintosh.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":"2015-04-19T19:38:43.000Z","updated_at":"2024-10-27T20:31:52.000Z","dependencies_parsed_at":"2022-08-30T06:00:20.055Z","dependency_job_id":null,"html_url":"https://github.com/mafintosh/taco-nginx","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Ftaco-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Ftaco-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Ftaco-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Ftaco-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mafintosh","download_url":"https://codeload.github.com/mafintosh/taco-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248949669,"owners_count":21188123,"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":"2024-08-01T13:02:36.069Z","updated_at":"2025-04-14T19:43:50.144Z","avatar_url":"https://github.com/mafintosh.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# taco-nginx\n\nBash script that runs a service and forwards a subdomain to it using nginx when it listens to `$PORT`\n\n```\nnpm install -g taco-nginx\n```\n\nWe recommend using latest stable nginx (\u003e1.8.0). If you are on Ubuntu LTS for example you may need to do this:\n\n```\nadd-apt-repository ppa:nginx/stable\napt-get update\napt-get install nginx\n```\n\n## Usage\n\nFirst write a service (in any language) similar to this\n\n``` js\nvar http = require('http')\nvar server = http.createServer(function (req, res) {\n  console.log('Got request!', req.url)\n  res.end('hello world\\n')\n})\n\nserver.listen(process.env.PORT, function () {\n  console.log('Server is listening...')\n})\n```\n\nAssuming the above file is called `server.js` and you have `nginx` running you can now do\n\n``` sh\ntaco-nginx --name my-service node server.js\n```\n\ntaco-nginx will now spawn `node server.js`, wait for it to listen to the port specified in\n`$PORT` and then have nginx route requests to `my-service.*` to it.\n\nIf you don't specify `--name` it will see if you have a `package.json` and use the name field\n\n``` sh\ntaco-nginx node server.js # uses name from package.json\n```\n\nFor a full list of options run\n\n```\ntaco-nginx --help\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Ftaco-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmafintosh%2Ftaco-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Ftaco-nginx/lists"}