项目作者: chrisgrounds

项目描述 :
A serverless compound interest API
高级语言: JavaScript
项目地址: git://github.com/chrisgrounds/compound-interest-calculator-api.git


compound-interest-calculator-api

Node.js CI

A serverless compound interest API on AWS Lambda.

Visit:

https://3jvichlsm2.execute-api.eu-west-2.amazonaws.com/dev/calculate/api?principal=100&interestRate=0.15&monthlyAmount=400&termLength=10

Example output:

  1. {
  2. "value": 111906.93,
  3. "history": [
  4. {
  5. "year": 1,
  6. "value": 100
  7. },
  8. {
  9. "year": 2,
  10. "value": 5324.52
  11. },
  12. {
  13. "year": 3,
  14. "value": 11388.91
  15. },
  16. {
  17. "year": 4,
  18. "value": 18428.17
  19. },
  20. {
  21. "year": 5,
  22. "value": 26599.03
  23. },
  24. {
  25. "year": 6,
  26. "value": 36083.39
  27. },
  28. {
  29. "year": 7,
  30. "value": 47092.41
  31. },
  32. {
  33. "year": 8,
  34. "value": 59871.17
  35. },
  36. {
  37. "year": 9,
  38. "value": 74704.18
  39. }
  40. ],
  41. "input": {
  42. "principal": 100,
  43. "monthlyAmount": 400,
  44. "interestRate": 0.15,
  45. "termLength": 10
  46. }
  47. }