Skip to content
Snippets Groups Projects
Commit cbc884f5 authored by Johannes Borgen's avatar Johannes Borgen
Browse files

added some example links, finished docker deployment

parent 188b7e8f
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ Group members: Job Nestor, Johannes Borgen, Bjørnar Larsen
This endpoint returns the http status of the the 2 API's we use as well as checking connectivity with the database.
You can view this endpoint by sending a GET request to: <code>/altocumulus/v1/status/</code>
example: http://10.212.137.140:8080/altocumulus/v1/status/
## Turer
This endpoint returns a list of different routes it takes can take 2 parameters ?limit="int" and &skip="int".
If they are not specified it wil set limit to 20 and it wont skip (start at 0)
......@@ -24,6 +25,7 @@ The endpoint provides more information about the route as well as weatherforecas
#### Get
By sending a Get request to the endpoint you wil get all a list of all the reviews from the database.
example: http://10.212.137.140:8080/altocumulus/v1/tur/524081f9b8cb77df150007fa
#### Post
By sending a Post request with a payload you can add a review to the database. Example payload:
<code> {"navn": "Andre", "turid": "524081f9b8cb77df150007fa", "beskrivelse": "Dette var en fin tur", "terningkast": 5} </code>
......@@ -46,6 +48,20 @@ By sending a GET request to the weather endpoint with valid float64 values for l
We install docker using the official guidelines for docker repository and latest stable release:
https://docs.docker.com/install/linux/docker-ce/ubuntu/
Dockerfile <br>
<code>FROM golang:latest <br>
RUN mkdir /app <br>
ADD . /app <br>
WORKDIR /app <br>
RUN go build -o main cmd/main.go <br>
CMD ["/app/main"]
</code>
With the Dockerfile in the root dir: <br>
<code>docker build -t cloudproject-app . <br>
docker run --restart=always -d -p 8080:8080 cloudproject-app
</code>
# Report
###### brief description of the original project plan, and what has and has not been achieved/changed in the final product
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment