Running the solution

We built many components over the previous two chapters, and it is now time to see them all working together. This section contains everything you need in order to get all the items running, assuming you have the environment set up properly, as described at the beginning of the previous chapter. This section assumes you have a single folder that contains the four subfolders: api, counter, twittervotes, and web.

Assuming nothing is running, take the following steps (each step in its own terminal window):

  1. In the top-level folder, start the nsqlookupd daemon:
    nsqlookupd
    
  2. In the same directory, start the nsqd daemon:
    nsqd --lookupd-tcp-address=localhost:4160
    
  3. Start the MongoDB daemon:
    mongod
    
  4. Navigate to the counter folder and build ...

Get Go: Design Patterns for Real-World Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.