{"id":22468589,"url":"https://github.com/projectweekend/forecast.io-rpc-service","last_synced_at":"2026-06-20T21:31:21.781Z","repository":{"id":24022817,"uuid":"27407399","full_name":"projectweekend/Forecast.io-RPC-Service","owner":"projectweekend","description":"An RPC service providing Forecast.io data using RabbitMQ","archived":false,"fork":false,"pushed_at":"2015-01-10T14:58:29.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T21:39:32.196Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectweekend.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":"2014-12-02T00:37:18.000Z","updated_at":"2015-01-10T14:58:29.000Z","dependencies_parsed_at":"2022-08-22T02:20:49.840Z","dependency_job_id":null,"html_url":"https://github.com/projectweekend/Forecast.io-RPC-Service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/projectweekend/Forecast.io-RPC-Service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FForecast.io-RPC-Service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FForecast.io-RPC-Service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FForecast.io-RPC-Service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FForecast.io-RPC-Service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectweekend","download_url":"https://codeload.github.com/projectweekend/Forecast.io-RPC-Service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2FForecast.io-RPC-Service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34586666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-06T11:17:53.876Z","updated_at":"2026-06-20T21:31:21.761Z","avatar_url":"https://github.com/projectweekend.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project connects to a [RabbitMQ](http://www.rabbitmq.com/) server and listens for messages. When a message is received on the appropriate queue, weather forecast data is gathered from [Forecast.io](https://developer.forecast.io/) and returned to the client that sent the message.\n\n\n### Installation with Fabric\n\nUsing [Fabric](http://www.fabfile.org/) there is an installation task included in this project's `fabfile`:\n\n```\nfab local install\n```\n\nThe task will prompt you for these values:\n\n* `Hostname:` - The hostname of a local computer, for example: `test-server`. Given the example, the Fabric script will attempt to ssh into `test-server.local`.\n* `User:` - The user for the local computer so Fabric can connect via SSH.\n* `Loggly token:` - The token from your [Loggly](https://www.loggly.com/) account. The service logs data using Loggly which makes it easier to remotely monitor.\n* `Loggly domain:` - The domain from your Loggly account.\n* `Forecast.io key:` - The API key for [Forecast.io](https://developer.forecast.io/).\n* `Rabbit URL:` - The connection URL for the RabbitMQ server. If you don't feel like running your own, check out [CloudAMPQ](https://www.cloudamqp.com/).\n\nThe install process will add an [Upstart](http://upstart.ubuntu.com/) script.\n\nTo manually stop it:\n```\nsudo service forecast-rpc stop\n```\n\nTo manually start it:\n```\nsudo service forecast-rpc start\n```\n\n\n### Usage\n\nAny script or program can request data from this service provided:\n\n* It has the same `Rabbit URL` value used during installation and can connect to the RabbitMQ server.\n* It sends messages to the correct queue (`forecast.get` in this project).\n\n\n#### JavaScript Example\n\nThere are plenty of JavaScript client libraries for RabbitMQ. This example uses [Jackrabbit](https://github.com/hunterloftis/jackrabbit).\n\n```javascript\nvar jackrabbit = require( \"jackrabbit\" );\n\n// Use an environment variable for RABBIT_URL\nvar broker = jackrabbit( process.env.RABBIT_URL, 1 );\n\nvar ready = function () {\n    // See Forecast.io API documentation for more info about 'options'\n    var message = {\n        latitude: 41.885246,\n        longitude: -87.642853,\n        options: {\n            exclude: [ \"minutely\", \"daily\", \"alerts\" ]\n        }\n    };\n\n    // Send a message to request the weather data\n    broker.publish( \"forecast.get\", message, function ( err, data ) {\n        if ( err ) {\n            // Do something with the error\n            console.log( err );\n        }\n        // Do something with the weather data\n        console.log( data );\n        process.exit();\n    } );\n};\n\nvar create = function () {\n    broker.create( \"forecast.get\", { prefetch: 5 }, ready );\n};\n\nbroker.once( \"connected\", create );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fforecast.io-rpc-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectweekend%2Fforecast.io-rpc-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fforecast.io-rpc-service/lists"}