https://github.com/heroku-examples/summit-service
Node Summit 2015 Service example
https://github.com/heroku-examples/summit-service
Last synced: 3 months ago
JSON representation
Node Summit 2015 Service example
- Host: GitHub
- URL: https://github.com/heroku-examples/summit-service
- Owner: heroku-examples
- Created: 2015-02-10T17:30:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-11T20:56:47.000Z (over 10 years ago)
- Last Synced: 2025-02-09T04:19:27.099Z (5 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 3
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Node Summit 15
## Production Node Architecture
### Set up
Clone the project:
```
git clone https://github.com/heroku-examples/summit-service.git
cd summit-service
npm install
```Inject config (Linux / OSX):
```
export CLOUDAMQP_URL=amqp://idhertwy:[email protected]/idhertwy
```Inject config (Windows):
```
set CLOUDAMQP_URL=amqp://idhertwy:[email protected]/idhertwy
```Start the service locally:
```
npm start
```### Test
Check out [the web service](https://summit-web.herokuapp.com/?zip=98122)
to see it communicating with your service.The source is available at
[https://github.com/heroku-examples/summit-web](https://github.com/heroku-examples/summit-web)### Build
This example service responds to `weather.get` messages.
You can provide more services by handling different types of messages:```js
var SERVICE = 'weather.get';// ...
function handle(message, respond) {
logger.log({ type: 'info', message: 'request', service: SERVICE });
respond("Your response here");
}
```The web service uses these messages:
- weather.get (text)
- quote.get (text)
- cute.get (image src)