A very simple API for getting factors of a number.
- Run
bundle install
to install the required gems. - The Procfile can be used to deploy to Heroku.
Going to /api will give a JSON response with the current year's factors. You can append a number to the end to get factors of whatever number you like.
For instance:
localhost:4567/api/360
will return
{"factors":[1,2,3,4,5,6,8,9,10,12,15,18,20,24,30,36,40,45,60,72,90,120,180,360]}