Commit 69534620 authored by VANDAELE Julien's avatar VANDAELE Julien
Browse files

change application server port

parent 9830f206
......@@ -10,8 +10,8 @@ npm install
node .
```
To view the Swagger UI interface, open http://localhost:8080/docs in your browser.
To view the map, open http://localhost:8080/map in your browser.
To view the Swagger UI interface, open http://localhost:3000/docs in your browser.
To view the map, open http://localhost:3000/map in your browser.
You can inject some data to have an idea of the rendering, see [this section](#inject)).
......
......@@ -5,7 +5,7 @@ var http = require('http');
var swaggerTools = require('swagger-tools');
var jsyaml = require('js-yaml');
var fs = require('fs');
var serverPort = 8080;
var serverPort = 3000;
// swaggerRouter configuration
var options = {
......
......@@ -26,4 +26,4 @@ fo.close()
for key, value in data.iteritems():
json = '{"id": "%s", "position": {"x": %s, "y": %s}, "value": %s}' % (key, value['y'], value['x'], value['light'])
# print json
call(["curl","-X", "POST", "--header", "Content-Type: application/json", "--header", "Accept: application/json", "-d" , json, "http://localhost:8080/measure"])
call(["curl","-X", "POST", "--header", "Content-Type: application/json", "--header", "Accept: application/json", "-d" , json, "http://localhost:3000/measure"])
......@@ -13,7 +13,4 @@ for i in range(1,MAX_NODES):
x = str(i % 8)
y = str(i / 8)
value = str(random.randint(1,200))
call(["curl","-X", "POST", "--header", "Content-Type: application/json", "--header", "Accept: application/json", "-d" ,"{\"id\": \"" + node_name + "\",\"position\": {\"x\":" + x +",\"y\":" + y + "},\"value\":" + value + "}","http://localhost:8080/measure"])
call(["curl","-X", "POST", "--header", "Content-Type: application/json", "--header", "Accept: application/json", "-d", "{\"id\": \"" + node_name + "\",\"position\": {\"x\":" + x + ",\"y\":" + y + "},\"value\":" + value + "}", "http://localhost:3000/measure"])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment