Tom Grossman
- clone repo https://github.com/tomgrossman/echo_at_time.git
- cd into the folder
- run
docker-compose up -d --build
- You can use any REST application (like postman, curl, etc...).
- The server is listening on port 3000
- Example for curl POST message:
curl -X POST \
http://localhost:3000/echoAtTime \
-H 'Content-Type: application/json' \
-d '{
"time": 1577836800000,
"message": "this is a test message"
}'
This message will be printed at "2020-01-01"
- The server is printing the messages to the console
- In order to read the console, use:
docker logs echo-node -f
- In order to test the persistence:
- POST message
- Stop node server with
docker rm -f echo-node
- Run the node after the time of the message has passed with
docker-compose up -d
- The app will print all messages that should have been printed while the app was down