Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all the examples for consistency and simplicity #29

Merged
merged 13 commits into from
Sep 28, 2019

Conversation

kabirbaidhya
Copy link
Contributor

Refactor examples for consistency and simplicity.

  • Refactor node example
  • Refactor express example
  • Refactor logger - add timestamp and tweaked the format a bit

New output for both examples

2019-09-28T11:08:35.261Z [ INFO ] HTTP server listening on port 3000!
2019-09-28T11:08:39.987Z [ DEBUG ] f1aa3c12 - Persisted a: 20
2019-09-28T11:08:39.987Z [ DEBUG ] f1aa3c12 - Persisted b: 30
2019-09-28T11:08:39.988Z [ DEBUG ] f1aa3c12 - Simulating delayed access
2019-09-28T11:08:39.988Z [ DEBUG ] f1aa3c12 - Calculated sum: 50
2019-09-28T11:08:39.988Z [ DEBUG ] f1aa3c12 - Persisted sum: 50
2019-09-28T11:08:39.991Z [ INFO ] f1aa3c12 - Response sent
2019-09-28T11:08:40.003Z [ DEBUG ] 81992355 - Persisted a: 10
2019-09-28T11:08:40.003Z [ DEBUG ] 81992355 - Persisted b: 50
2019-09-28T11:08:40.003Z [ DEBUG ] 81992355 - Simulating delayed access
2019-09-28T11:08:40.003Z [ DEBUG ] 81992355 - Calculated sum: 60
2019-09-28T11:08:40.003Z [ DEBUG ] 81992355 - Persisted sum: 60
2019-09-28T11:08:40.003Z [ INFO ] 81992355 - Response sent
2019-09-28T11:08:40.014Z [ DEBUG ] 66fe2219 - Persisted a: 50
2019-09-28T11:08:40.014Z [ DEBUG ] 66fe2219 - Persisted b: 100
2019-09-28T11:08:40.014Z [ DEBUG ] 66fe2219 - Simulating delayed access
2019-09-28T11:08:40.015Z [ DEBUG ] 66fe2219 - Calculated sum: 150
2019-09-28T11:08:40.015Z [ DEBUG ] 66fe2219 - Persisted sum: 150
2019-09-28T11:08:40.015Z [ INFO ] 66fe2219 - Response sent
2019-09-28T11:08:41.988Z [ INFO ] f1aa3c12 - Store contents: {"a":"20","b":"30","sum":50}
2019-09-28T11:08:42.003Z [ INFO ] 81992355 - Store contents: {"a":"10","b":"50","sum":60}
2019-09-28T11:08:42.015Z [ INFO ] 66fe2219 - Store contents: {"a":"50","b":"100","sum":150}

@kabirbaidhya kabirbaidhya merged commit 5bde0c6 into master Sep 28, 2019
@kabirbaidhya kabirbaidhya deleted the refactor-examples branch September 28, 2019 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants