HSG-MCS-HS21_tapas/mocks
2021-12-06 03:32:15 +01:00
..
auction-house added ahCrawler and finished discovery endpoint 2021-12-06 03:32:15 +01:00
.gitignore added ahCrawler and finished discovery endpoint 2021-12-06 03:32:15 +01:00
package.json added ahCrawler and finished discovery endpoint 2021-12-06 03:32:15 +01:00
README.md First implementation of WebSub 2021-11-10 15:14:41 +01:00
yarn.lock added ahCrawler and finished discovery endpoint 2021-12-06 03:32:15 +01:00

In this directory are some files to mock an auction house to test WebSub local.

To run a local WebSubHub instance

  1. Start a mongodb in docker:
  • docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no tutum/mongodb
  1. Install a local hub
  • yarn global add websub-hub
  1. Run the hub localy
  • websub-hub -l info -m mongodb://localhost:27017/hub

Create an example subscription

  • node auction-house/subscriber.js

Create an example auctionhouse

  • node auction-house/auctions.js

Publish to the hub

  • node auction-house/publisher.js

Mostly inspired by: https://github.com/hemerajs/websub-hub