Skip to content

Commit 898ded0

Browse files
committed
Add more tasks too.
1 parent bdc731e commit 898ded0

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

tasks.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
- This business logic has two ports.
1515
- One is responsible for greeting (primary port). It should define a `greet` method with a name string parameter and should return nothing.
16-
- Another is responsible for storing the message (secondary port). It should define a `store` method with a greeting string parameter and should return nothing.
16+
- Another is responsible for storing the message (secondary port). It should define a `save` method with a greeting string parameter and should return a void.
1717

1818
## Task 2: Add the ports to the business logic
1919

@@ -35,7 +35,25 @@
3535

3636
## Task 5: Wire up the things
3737

38-
- Use the `args.ts` to wire up everything.
38+
- Use the `src/args.ts` to wire up everything.
3939
- This file should initiate the service, the business logic with the proper secondary adapters.
4040
- It also pass the service to the primary adapter to use it.
41-
- Run your code with the `npm run ts -- args.ts Alice` command.
41+
- Run your code with the `npm run ts -- src/args.ts Alice` command.
42+
43+
## Task 6: Create test for the service
44+
45+
- Create some tests for the service.
46+
47+
## Task 6: Add a new prompt application to the program
48+
49+
- Create a new application in `src/prompt.ts`.
50+
- This application should use the same service, but right now the user enter their name
51+
in a simple prompt (`prompt-sync`).
52+
- This application really saves the greetings into the `greetings.txt` file. Each greeting is a new line.
53+
54+
## Task 7: Add a new server application to the program.
55+
56+
- Create a new application in `src/server.ts`.
57+
- This application should accept a `POST /greet` request. The request body is a JSON document with a name key.
58+
- The response should be a JSON document too, with a greeting key, its value is the greeting.
59+
- The greetings should be logged also the greetings JSON. It is a JSON array, every element of the array is a greeting.

0 commit comments

Comments
 (0)