From b3a6dfc9b00d3332c8f1597174160907f8cb570a Mon Sep 17 00:00:00 2001 From: oalfonso Date: Sat, 2 Sep 2017 20:11:14 +0100 Subject: [PATCH] Move port to 8081 --- Dockerfile | 2 +- dist/api-docs.json | 42 +++++++++++++++++++++--------------------- server.js | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f7cda2..1454618 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,5 @@ RUN npm install # Bundle app source COPY . . -EXPOSE 8080 +EXPOSE 8081 CMD [ "npm", "start" ] diff --git a/dist/api-docs.json b/dist/api-docs.json index 7064fba..804b22c 100644 --- a/dist/api-docs.json +++ b/dist/api-docs.json @@ -6,6 +6,7 @@ "description": "API to return basic static for IMSA and WEC", "termsOfService": "http://swagger.io/terms/" }, + "host": "echo-api.endpoints.round-folio-164619.cloud.goog", "basePath": "/", "schemes": [ "http" @@ -47,24 +48,21 @@ "in": "path", "description": "Name of the series", "required": true, - "type": "string", - "example" : "IMSA" + "type": "string" }, { "name": "year", "in": "path", "description": "Year of the race", "required": true, - "type": "string", - "example" : "2017" + "type": "string" }, { "name": "race", "in": "path", "description": "Race to query", "required": true, - "type": "string", - "example" : "SEBRING" + "type": "string" } ], "responses": { @@ -78,72 +76,74 @@ "description": "Race not Found" } } - }, + } } }, + "definitions": { - "raceData": { + "raceList":{ + "type": "array", + "items": { + "$ref": "#/definitions/raceobject" + } + }, + "raceData":{ + "type": "array", + "items": { + "$ref": "#/definitions/raceDataRecord" + } + }, + "raceDataRecord": { "properties": { "class": { - "required": true, "type" : "string", "example" : "LMP1" }, "manufacturer" : { - "required": true, "type": "string", "example": "Aston Martin" }, "team" : { - "required": true, "type": "string", "example": "Manor" }, "driver" : { - "required": true, "type": "string", "example": "Andre Lotterer" }, "laps" : { - "required": true, "type": "number", "example": "78" }, "min" : { - "required": true, "type": "number", "example": "178.44" }, "avg" : { - "required": true, "type": "number", "example": "188.44" }, "Top 20 average" : { - "required": true, "type": "number", "example": "183.44" } } }, - "raceList": { + "raceobject": { "properties": { "series": { - "required": true, "type" : "string", "example" : "IMSA" }, "year" : { - "required": true, "type": "string", "example": "2017" }, "event" : { - "required": true, "type": "string", "example": "SEBRING" } } - }, + } } } diff --git a/server.js b/server.js index 7faa36e..5d1aa7a 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ var argv = require('minimist')(process.argv.slice(2)); var swagger = require("swagger-node-express"); var bodyParser = require( 'body-parser' ); -var port = process.env.PORT || 8080; // set our port +var port = process.env.PORT || 8081; // set our port var router = express.Router(); // get an instance of the express Router // Get race data API service