Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heroku-examples/summit-service
Node Summit 2015 Service example
https://github.com/heroku-examples/summit-service
Last synced: 2 days 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 (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-11T20:56:47.000Z (almost 10 years ago)
- Last Synced: 2024-04-14T18:35:56.631Z (10 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 3
- Watchers: 9
- 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)