An open API service indexing awesome lists of open source software.

https://github.com/andeemarks/nact

Code example using the Nact JS framework, as described in the "Actors and Processes" chapter of The Pragmatic Programmer (20th anniversary edition)
https://github.com/andeemarks/nact

Last synced: 10 months ago
JSON representation

Code example using the Nact JS framework, as described in the "Actors and Processes" chapter of The Pragmatic Programmer (20th anniversary edition)

Awesome Lists containing this project

README

          

# nact
Code example using the Nact JS framework, as described in the "Actors and Processes" chapter of The Pragmatic Programmer (20th anniversary edition)

## Installation

See [Nact instructions](https://nact.xyz/en_uk/lesson/javascript/getting-started) or...

```
npm install --save nact
```

## Running the code

```
node index.js
```
### Sample output

```
customer1 sees "apple pie slice" appear on the table
customer2 sees "peach pie slice" appear on the table
customer1 sees "cherry pie slice" appear on the table
Waiter adds apple pie slice to customer1's order
Waiter adds peach pie slice to customer2's order
Waiter adds cherry pie slice to customer1's order

The waiter apologizes to customer2: no pie left
customer2 sulks…

The waiter apologizes to customer1: no pie left
customer1 sulks…
```