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)
- Host: GitHub
- URL: https://github.com/andeemarks/nact
- Owner: andeemarks
- Created: 2023-05-21T07:12:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T00:35:27.000Z (over 2 years ago)
- Last Synced: 2025-02-01T03:07:37.369Z (11 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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…
```