MartinsOnuoha / countriesNowAPI

CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎
http://countriesnow.space
MIT License
179 stars 55 forks source link

:sparkles: (All GET routes in countries.js) Added route caching #100

Closed TimAagaard closed 2 years ago

TimAagaard commented 2 years ago

Added route caching for 24 hours on all GET routes in countries.js. Added caching configurations in /config/apicache.js that are determined by NODE_ENV. Added default NODE_ENV = 'local' to .env - this enables caching with all debug output. If NODE_ENV is set to 'test', caching is disabled (this prevents unit tests from using the cache). Any other value of NODE_ENV will result in the production config being used.

Closes #94