From 17312f0b46b7190ae3504bc40ceca3358252f1c6 Mon Sep 17 00:00:00 2001 From: Sanjeev Sreenath Date: Mon, 21 Oct 2019 01:01:53 -0400 Subject: [PATCH 1/6] Dockerize apod-api --- Dockerfile | 7 +++ README.md | 151 +++++++++++++++++++++++++++--------------------- apod/service.py | 6 +- 3 files changed, 95 insertions(+), 69 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..511e021 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:2-alpine + +WORKDIR /usr/src/app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +CMD [ "python", "apod/service.py" ] diff --git a/README.md b/README.md index f94a8d8..932fcd8 100644 --- a/README.md +++ b/README.md @@ -86,13 +86,33 @@ pip install -r requirements.txt ```bash python apod/service.py ``` + +### Run it in Docker + +1. Clone the repo +```bash +git clone https://github.com/nasa/apod-api.git +``` +2. `cd` into the new directory +```bash +cd apod-api +``` +3. Build the image +```bash +docker build . -t apod-api +``` +4. Run the image +```bash +docker run -p 5000:5000 apod-api +``` +   ## Docs ### Endpoint: `//apod` There is only one endpoint in this service which takes 2 optional fields -as parameters to a http GET request. A JSON dictionary is returned nominally. +as parameters to a http GET request. A JSON dictionary is returned nominally. **Fields** @@ -115,7 +135,7 @@ as parameters to a http GET request. A JSON dictionary is returned nominally. - `media_type` The type of media (data) returned. May either be 'image' or 'video' depending on content. - `explanation` The supplied text explanation of the image. - `concepts` The most relevant concepts within the text explanation. Only supplied if `concept_tags` is set to True. -- `thumbnail_url` The URL of thumbnail of the video. +- `thumbnail_url` The URL of thumbnail of the video. **Example** @@ -131,14 +151,14 @@ localhost:5000/v1/apod?date=2014-10-01&concept_tags=True image_set: "apod" }, concept_tags: "True", - date: "2013-10-01", + date: "2013-10-01", title: "Filaments of the Vela Supernova Remnant", url: "http://apod.nasa.gov/apod/image/1310/velafilaments_jadescope_960.jpg", explanation: "The explosion is over but the consequences continue. About eleven thousand years ago a star in the constellation of Vela could be seen to explode, - creating a strange point of light briefly visible to humans living near the - beginning of recorded history. The outer layers of the star crashed into the - interstellar medium, driving a shock wave that is still visible today. A roughly + creating a strange point of light briefly visible to humans living near the + beginning of recorded history. The outer layers of the star crashed into the + interstellar medium, driving a shock wave that is still visible today. A roughly spherical, expanding shock wave is visible in X-rays. The above image captures some of that filamentary and gigantic shock in visible light. As gas flies away from the detonated star, it decays and reacts with the interstellar medium, producing light @@ -173,50 +193,50 @@ https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&count=5 ```jsoniq [ { - "copyright": "Panther Observatory", - "date": "2006-04-15", - "explanation": "In this stunning cosmic vista, galaxy M81 is on the left surrounded by blue spiral arms. On the right marked by massive gas and dust clouds, is M82. These two mammoth galaxies have been locked in gravitational combat for the past billion years. The gravity from each galaxy dramatically affects the other during each hundred million-year pass. Last go-round, M82's gravity likely raised density waves rippling around M81, resulting in the richness of M81's spiral arms. But M81 left M82 with violent star forming regions and colliding gas clouds so energetic the galaxy glows in X-rays. In a few billion years only one galaxy will remain.", - "hdurl": "https://apod.nasa.gov/apod/image/0604/M81_M82_schedler_c80.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Galaxy Wars: M81 versus M82", + "copyright": "Panther Observatory", + "date": "2006-04-15", + "explanation": "In this stunning cosmic vista, galaxy M81 is on the left surrounded by blue spiral arms. On the right marked by massive gas and dust clouds, is M82. These two mammoth galaxies have been locked in gravitational combat for the past billion years. The gravity from each galaxy dramatically affects the other during each hundred million-year pass. Last go-round, M82's gravity likely raised density waves rippling around M81, resulting in the richness of M81's spiral arms. But M81 left M82 with violent star forming regions and colliding gas clouds so energetic the galaxy glows in X-rays. In a few billion years only one galaxy will remain.", + "hdurl": "https://apod.nasa.gov/apod/image/0604/M81_M82_schedler_c80.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Galaxy Wars: M81 versus M82", "url": "https://apod.nasa.gov/apod/image/0604/M81_M82_schedler_c25.jpg" - }, + }, { - "date": "2013-07-22", - "explanation": "You are here. Everyone you've ever known is here. Every human who has ever lived -- is here. Pictured above is the Earth-Moon system as captured by the Cassini mission orbiting Saturn in the outer Solar System. Earth is the brighter and bluer of the two spots near the center, while the Moon is visible to its lower right. Images of Earth from Saturn were taken on Friday. Quickly released unprocessed images were released Saturday showing several streaks that are not stars but rather cosmic rays that struck the digital camera while it was taking the image. The above processed image was released earlier today. At nearly the same time, many humans on Earth were snapping their own pictures of Saturn. Note: Today's APOD has been updated.", - "hdurl": "https://apod.nasa.gov/apod/image/1307/earthmoon2_cassini_946.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Earth and Moon from Saturn", + "date": "2013-07-22", + "explanation": "You are here. Everyone you've ever known is here. Every human who has ever lived -- is here. Pictured above is the Earth-Moon system as captured by the Cassini mission orbiting Saturn in the outer Solar System. Earth is the brighter and bluer of the two spots near the center, while the Moon is visible to its lower right. Images of Earth from Saturn were taken on Friday. Quickly released unprocessed images were released Saturday showing several streaks that are not stars but rather cosmic rays that struck the digital camera while it was taking the image. The above processed image was released earlier today. At nearly the same time, many humans on Earth were snapping their own pictures of Saturn. Note: Today's APOD has been updated.", + "hdurl": "https://apod.nasa.gov/apod/image/1307/earthmoon2_cassini_946.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Earth and Moon from Saturn", "url": "https://apod.nasa.gov/apod/image/1307/earthmoon2_cassini_960.jpg" - }, + }, { - "copyright": "Joe Orman", - "date": "2000-04-06", - "explanation": "Rising before the Sun on February 2nd, astrophotographer Joe Orman anticipated this apparition of the bright morning star Venus near a lovely crescent Moon above a neighbor's house in suburban Phoenix, Arizona, USA. Fortunately, the alignment of bright planets and the Moon is one of the most inspiring sights in the night sky and one that is often easy to enjoy and share without any special equipment. Take tonight, for example. Those blessed with clear skies can simply step outside near sunset and view a young crescent Moon very near three bright planets in the west Jupiter, Mars, and Saturn. Jupiter will be the unmistakable brightest star near the Moon with a reddish Mars just to Jupiter's north and pale yellow Saturn directly above. Of course, these sky shows create an evocative picture but the planets and Moon just appear to be near each other -- they are actually only approximately lined up and lie in widely separated orbits. Unfortunately, next month's highly publicized alignment of planets on May 5th will be lost from view in the Sun's glare but such planetary alignments occur repeatedly and pose no danger to planet Earth.", - "hdurl": "https://apod.nasa.gov/apod/image/0004/vm_orman_big.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Venus, Moon, and Neighbors", + "copyright": "Joe Orman", + "date": "2000-04-06", + "explanation": "Rising before the Sun on February 2nd, astrophotographer Joe Orman anticipated this apparition of the bright morning star Venus near a lovely crescent Moon above a neighbor's house in suburban Phoenix, Arizona, USA. Fortunately, the alignment of bright planets and the Moon is one of the most inspiring sights in the night sky and one that is often easy to enjoy and share without any special equipment. Take tonight, for example. Those blessed with clear skies can simply step outside near sunset and view a young crescent Moon very near three bright planets in the west Jupiter, Mars, and Saturn. Jupiter will be the unmistakable brightest star near the Moon with a reddish Mars just to Jupiter's north and pale yellow Saturn directly above. Of course, these sky shows create an evocative picture but the planets and Moon just appear to be near each other -- they are actually only approximately lined up and lie in widely separated orbits. Unfortunately, next month's highly publicized alignment of planets on May 5th will be lost from view in the Sun's glare but such planetary alignments occur repeatedly and pose no danger to planet Earth.", + "hdurl": "https://apod.nasa.gov/apod/image/0004/vm_orman_big.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Venus, Moon, and Neighbors", "url": "https://apod.nasa.gov/apod/image/0004/vm_orman.jpg" - }, + }, { - "date": "2014-07-12", - "explanation": "A new star, likely the brightest supernova in recorded human history, lit up planet Earth's sky in the year 1006 AD. The expanding debris cloud from the stellar explosion, found in the southerly constellation of Lupus, still puts on a cosmic light show across the electromagnetic spectrum. In fact, this composite view includes X-ray data in blue from the Chandra Observatory, optical data in yellowish hues, and radio image data in red. Now known as the SN 1006 supernova remnant, the debris cloud appears to be about 60 light-years across and is understood to represent the remains of a white dwarf star. Part of a binary star system, the compact white dwarf gradually captured material from its companion star. The buildup in mass finally triggered a thermonuclear explosion that destroyed the dwarf star. Because the distance to the supernova remnant is about 7,000 light-years, that explosion actually happened 7,000 years before the light reached Earth in 1006. Shockwaves in the remnant accelerate particles to extreme energies and are thought to be a source of the mysterious cosmic rays.", - "hdurl": "https://apod.nasa.gov/apod/image/1407/sn1006c.jpg", - "media_type": "image", - "service_version": "v1", - "title": "SN 1006 Supernova Remnant", + "date": "2014-07-12", + "explanation": "A new star, likely the brightest supernova in recorded human history, lit up planet Earth's sky in the year 1006 AD. The expanding debris cloud from the stellar explosion, found in the southerly constellation of Lupus, still puts on a cosmic light show across the electromagnetic spectrum. In fact, this composite view includes X-ray data in blue from the Chandra Observatory, optical data in yellowish hues, and radio image data in red. Now known as the SN 1006 supernova remnant, the debris cloud appears to be about 60 light-years across and is understood to represent the remains of a white dwarf star. Part of a binary star system, the compact white dwarf gradually captured material from its companion star. The buildup in mass finally triggered a thermonuclear explosion that destroyed the dwarf star. Because the distance to the supernova remnant is about 7,000 light-years, that explosion actually happened 7,000 years before the light reached Earth in 1006. Shockwaves in the remnant accelerate particles to extreme energies and are thought to be a source of the mysterious cosmic rays.", + "hdurl": "https://apod.nasa.gov/apod/image/1407/sn1006c.jpg", + "media_type": "image", + "service_version": "v1", + "title": "SN 1006 Supernova Remnant", "url": "https://apod.nasa.gov/apod/image/1407/sn1006c_c800.jpg" - }, + }, { - "date": "1997-01-21", - "explanation": "In Jules Verne's science fiction classic A Journey to the Center of the Earth, Professor Hardwigg and his fellow explorers encounter many strange and exciting wonders. What wonders lie at the center of our Galaxy? Astronomers now know of some of the bizarre objects which exist there, like vast dust clouds,\r bright young stars, swirling rings of gas, and possibly even a large black hole. Much of the Galactic center region is shielded from our view in visible light by the intervening dust and gas. But it can be explored using other forms of electromagnetic radiation, like radio, infrared, X-rays, and gamma rays. This beautiful high resolution image of the Galactic center region in infrared light was made by the SPIRIT III telescope onboard the Midcourse Space Experiment. The center itself appears as a bright spot near the middle of the roughly 1x3 degree field of view, the plane of the Galaxy is vertical, and the north galactic pole is towards the right. The picture is in false color - starlight appears blue while dust is greenish grey, tending to red in the cooler areas.", - "hdurl": "https://apod.nasa.gov/apod/image/9701/galcen_msx_big.gif", - "media_type": "image", - "service_version": "v1", - "title": "Journey to the Center of the Galaxy \r\nCredit:", + "date": "1997-01-21", + "explanation": "In Jules Verne's science fiction classic A Journey to the Center of the Earth, Professor Hardwigg and his fellow explorers encounter many strange and exciting wonders. What wonders lie at the center of our Galaxy? Astronomers now know of some of the bizarre objects which exist there, like vast dust clouds,\r bright young stars, swirling rings of gas, and possibly even a large black hole. Much of the Galactic center region is shielded from our view in visible light by the intervening dust and gas. But it can be explored using other forms of electromagnetic radiation, like radio, infrared, X-rays, and gamma rays. This beautiful high resolution image of the Galactic center region in infrared light was made by the SPIRIT III telescope onboard the Midcourse Space Experiment. The center itself appears as a bright spot near the middle of the roughly 1x3 degree field of view, the plane of the Galaxy is vertical, and the north galactic pole is towards the right. The picture is in false color - starlight appears blue while dust is greenish grey, tending to red in the cooler areas.", + "hdurl": "https://apod.nasa.gov/apod/image/9701/galcen_msx_big.gif", + "media_type": "image", + "service_version": "v1", + "title": "Journey to the Center of the Galaxy \r\nCredit:", "url": "https://apod.nasa.gov/apod/image/9701/galcen_msx.jpg" } ] @@ -228,7 +248,7 @@ https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&count=5 ```bash -https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&start_date=2017-07-08&end_date=2017-07-10 +https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&start_date=2017-07-08&end_date=2017-07-10 ```
See Return Object @@ -237,31 +257,31 @@ https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&start_date=2017-07-08&end_d ```jsoniq [ { - "copyright": "T. Rector", - "date": "2017-07-08", - "explanation": "Similar in size to large, bright spiral galaxies in our neighborhood, IC 342 is a mere 10 million light-years distant in the long-necked, northern constellation Camelopardalis. A sprawling island universe, IC 342 would otherwise be a prominent galaxy in our night sky, but it is hidden from clear view and only glimpsed through the veil of stars, gas and dust clouds along the plane of our own Milky Way galaxy. Even though IC 342's light is dimmed by intervening cosmic clouds, this sharp telescopic image traces the galaxy's own obscuring dust, blue star clusters, and glowing pink star forming regions along spiral arms that wind far from the galaxy's core. IC 342 may have undergone a recent burst of star formation activity and is close enough to have gravitationally influenced the evolution of the local group of galaxies and the Milky Way.", - "hdurl": "https://apod.nasa.gov/apod/image/1707/ic342_rector2048.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Hidden Galaxy IC 342", + "copyright": "T. Rector", + "date": "2017-07-08", + "explanation": "Similar in size to large, bright spiral galaxies in our neighborhood, IC 342 is a mere 10 million light-years distant in the long-necked, northern constellation Camelopardalis. A sprawling island universe, IC 342 would otherwise be a prominent galaxy in our night sky, but it is hidden from clear view and only glimpsed through the veil of stars, gas and dust clouds along the plane of our own Milky Way galaxy. Even though IC 342's light is dimmed by intervening cosmic clouds, this sharp telescopic image traces the galaxy's own obscuring dust, blue star clusters, and glowing pink star forming regions along spiral arms that wind far from the galaxy's core. IC 342 may have undergone a recent burst of star formation activity and is close enough to have gravitationally influenced the evolution of the local group of galaxies and the Milky Way.", + "hdurl": "https://apod.nasa.gov/apod/image/1707/ic342_rector2048.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Hidden Galaxy IC 342", "url": "https://apod.nasa.gov/apod/image/1707/ic342_rector1024s.jpg" - }, + }, { - "date": "2017-07-09", - "explanation": "Can you find your favorite country or city? Surprisingly, on this world-wide nightscape, city lights make this task quite possible. Human-made lights highlight particularly developed or populated areas of the Earth's surface, including the seaboards of Europe, the eastern United States, and Japan. Many large cities are located near rivers or oceans so that they can exchange goods cheaply by boat. Particularly dark areas include the central parts of South America, Africa, Asia, and Australia. The featured composite was created from images that were collected during cloud-free periods in April and October 2012 by the Suomi-NPP satellite, from a polar orbit about 824 kilometers above the surface, using its Visible Infrared Imaging Radiometer Suite (VIIRS).", - "hdurl": "https://apod.nasa.gov/apod/image/1707/EarthAtNight_SuomiNPP_3600.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Earth at Night", + "date": "2017-07-09", + "explanation": "Can you find your favorite country or city? Surprisingly, on this world-wide nightscape, city lights make this task quite possible. Human-made lights highlight particularly developed or populated areas of the Earth's surface, including the seaboards of Europe, the eastern United States, and Japan. Many large cities are located near rivers or oceans so that they can exchange goods cheaply by boat. Particularly dark areas include the central parts of South America, Africa, Asia, and Australia. The featured composite was created from images that were collected during cloud-free periods in April and October 2012 by the Suomi-NPP satellite, from a polar orbit about 824 kilometers above the surface, using its Visible Infrared Imaging Radiometer Suite (VIIRS).", + "hdurl": "https://apod.nasa.gov/apod/image/1707/EarthAtNight_SuomiNPP_3600.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Earth at Night", "url": "https://apod.nasa.gov/apod/image/1707/EarthAtNight_SuomiNPP_1080.jpg" - }, + }, { - "date": "2017-07-10", - "explanation": "What's happening around the center of this spiral galaxy? Seen in total, NGC 1512 appears to be a barred spiral galaxy -- a type of spiral that has a straight bar of stars across its center. This bar crosses an outer ring, though, a ring not seen as it surrounds the pictured region. Featured in this Hubble Space Telescope image is an inner ring -- one that itself surrounds the nucleus of the spiral. The two rings are connected not only by a bar of bright stars but by dark lanes of dust. Inside of this inner ring, dust continues to spiral right into the very center -- possibly the location of a large black hole. The rings are bright with newly formed stars which may have been triggered by the collision of NGC 1512 with its galactic neighbor, NGC 1510.", - "hdurl": "https://apod.nasa.gov/apod/image/1707/NGC1512_Schmidt_1342.jpg", - "media_type": "image", - "service_version": "v1", - "title": "Spiral Galaxy NGC 1512: The Nuclear Ring", + "date": "2017-07-10", + "explanation": "What's happening around the center of this spiral galaxy? Seen in total, NGC 1512 appears to be a barred spiral galaxy -- a type of spiral that has a straight bar of stars across its center. This bar crosses an outer ring, though, a ring not seen as it surrounds the pictured region. Featured in this Hubble Space Telescope image is an inner ring -- one that itself surrounds the nucleus of the spiral. The two rings are connected not only by a bar of bright stars but by dark lanes of dust. Inside of this inner ring, dust continues to spiral right into the very center -- possibly the location of a large black hole. The rings are bright with newly formed stars which may have been triggered by the collision of NGC 1512 with its galactic neighbor, NGC 1510.", + "hdurl": "https://apod.nasa.gov/apod/image/1707/NGC1512_Schmidt_1342.jpg", + "media_type": "image", + "service_version": "v1", + "title": "Spiral Galaxy NGC 1512: The Nuclear Ring", "url": "https://apod.nasa.gov/apod/image/1707/NGC1512_Schmidt_960.jpg" } ] @@ -277,5 +297,4 @@ Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo. ## Author -Brian Thomas (based on code by Dan Hammer) - +Brian Thomas (based on code by Dan Hammer) diff --git a/apod/service.py b/apod/service.py index 36bfe2d..01f9a92 100644 --- a/apod/service.py +++ b/apod/service.py @@ -1,7 +1,7 @@ """ A micro-service passing back enhanced information from Astronomy Picture of the Day (APOD). - + Adapted from code in https://github.com/nasa/planetary-api Dec 1, 2015 (written by Dan Hammer) @@ -25,7 +25,7 @@ LOG = logging.getLogger(__name__) logging.basicConfig(level=logging.DEBUG) -# this should reflect both this service and the backing +# this should reflect both this service and the backing # assorted libraries SERVICE_VERSION = 'v1' APOD_METHOD_NAME = 'apod' @@ -278,4 +278,4 @@ def application_error(e): if __name__ == '__main__': - app.run() + app.run(host='0.0.0.0' ,port=5000) From df2c0fd39e28cd32cc803344958675eb0e2a866b Mon Sep 17 00:00:00 2001 From: Sanjeev Sreenath Date: Mon, 21 Oct 2019 01:19:42 -0400 Subject: [PATCH 2/6] dockerize apod-api --- Dockerfile | 7 +++++++ README.md | 20 ++++++++++++++++++++ apod/service.py | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..511e021 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:2-alpine + +WORKDIR /usr/src/app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +CMD [ "python", "apod/service.py" ] diff --git a/README.md b/README.md index f94a8d8..41397c0 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,26 @@ pip install -r requirements.txt ```bash python apod/service.py ``` + +### Run it in Docker + +1. Clone the repo +```bash +git clone https://github.com/nasa/apod-api.git +``` +2. `cd` into the new directory +```bash +cd apod-api +``` +3. Build the image +```bash +docker build . -t apod-api +``` +4. Run the image +```bash +docker run -p 5000:5000 apod-api +``` +   ## Docs diff --git a/apod/service.py b/apod/service.py index 36bfe2d..4471ffe 100644 --- a/apod/service.py +++ b/apod/service.py @@ -278,4 +278,4 @@ def application_error(e): if __name__ == '__main__': - app.run() + app.run(host='0.0.0.0' ,port=5000) From 977feaeffa68a7d4ce7feed25c9fb70fbcbe848d Mon Sep 17 00:00:00 2001 From: Taylor Date: Fri, 10 Jul 2020 14:40:26 -0700 Subject: [PATCH 3/6] Add trailing newline to end of .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cba4454..cb37993 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ lib/ .DS_Store .idea/ apod/__pycache__/ -venv/ \ No newline at end of file +venv/ From 3b53db22898121f6e481641bd23f227f65de75f6 Mon Sep 17 00:00:00 2001 From: Taylor Date: Fri, 10 Jul 2020 14:44:11 -0700 Subject: [PATCH 4/6] Change CMD to list form and add ENTRYPOINT field --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 03573be..dafc9bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,5 @@ COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 5000 -CMD python application.py +ENTRYPOINT ["python"] +CMD ["application.py"] From 0284bdb8278b64556a9b6a0feb2940ed5de457ff Mon Sep 17 00:00:00 2001 From: Taylor Date: Fri, 10 Jul 2020 14:50:12 -0700 Subject: [PATCH 5/6] Specify port on Flassk application run command --- application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.py b/application.py index 846f0be..efa8da5 100644 --- a/application.py +++ b/application.py @@ -286,7 +286,7 @@ def application_error(e): if __name__ == '__main__': - application.run('0.0.0.0') + application.run('0.0.0.0', port=5000) # httpd = make_server('', 8000, application) # print("Serving on port 8000...") # httpd.serve_forever() From 496e3f63e055b8c8de6ab5b1b229fdd55af0252c Mon Sep 17 00:00:00 2001 From: Taylor Date: Fri, 10 Jul 2020 14:53:18 -0700 Subject: [PATCH 6/6] Remove old commented code --- application.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/application.py b/application.py index efa8da5..aafa3bc 100644 --- a/application.py +++ b/application.py @@ -287,6 +287,3 @@ def application_error(e): if __name__ == '__main__': application.run('0.0.0.0', port=5000) - # httpd = make_server('', 8000, application) - # print("Serving on port 8000...") - # httpd.serve_forever()