https://github.com/hashnuke/hello-stage
https://github.com/hashnuke/hello-stage
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hashnuke/hello-stage
- Owner: HashNuke
- Created: 2017-07-25T10:26:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-12T19:55:30.000Z (over 8 years ago)
- Last Synced: 2025-02-05T21:58:42.926Z (about 1 year ago)
- Language: Elixir
- Size: 94.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloStage
To start your Phoenix server:
* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`
* Install Node.js dependencies with `cd assets && npm install`
* Start Phoenix endpoint with `mix phx.server`
## Snippets
Try these in an iex console. Start one with `iex -S mix`.
### Simple producer & consumer
```
SimpleProducer.notify("hello")
Enum.map(1..10, fn(i)-> SimpleProducer.notify("hello #{i}") end)
```
### Simple producer & consumer with demand limits
Send 10 events
```
events = Enum.map(1..10, fn(i)-> "hello #{i}" end)
SimpleProducer.notify(events)
```
Send 20 events
```
events = Enum.map(1..20, fn(i)-> "hello #{i}" end)
SimpleProducer.notify(events)
```
### Good producer & consumer
```
events = Enum.map(1..10, fn(i)-> "hello #{i}" end)
GoodProducer.notify(events)
```
### HNSearch
```
HNSearch.Producer.notify(["apple", "microsoft", "google"])
```
### BacklinkSearch
```
BacklinkSearch.Producer.notify(["apple", "microsoft", "google"])
```
### BacklinkSearchV2
```
BacklinkSearchV2.Producer.notify(["apple", "microsoft", "google"])
```