Skip to content

butzopower/apod-proxy

Repository files navigation

APOD Proxy

Node application that proxies requests to NASA's Astronomy Picture Of the Day API and caches responses using Redis.

Setup

An API key for api.nasa.gov is required. A key can be generated in about 5 seconds at: https://api.nasa.gov/#signUp

Redis is running inside docker.

Run

Start up redis using docker-compose:

docker-compose up

To run the server on port 3000:

NASA_API_KEY=<nasa-api-key-here> npm start

Use

Hit the root endpoint with or without a date. Any request made with a date will have its response cached for 60 minutes.

curl http:https://localhost:3000/?date=2019-10-28

Deploy

To deploy to PCF, the following must be setup:

Deploy via:

./deploy.sh

Additionally, you can monitor the deploy using:

./monitor.sh

This is useful to make sure zero-downtime deployments are working as expected.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published