Skip to content

EricNeid/docker-webapplication

Repository files navigation

About

A simple REST-Full service. A dockerize environment with PostGIS database is provided as well.

Components

  • webserver
  • PostGIS Database

Quickstart

Use the provided Makefile for your convenience:

make all

Send test request:

curl -d '{"username":"max"}' -H "Content-Type: application/json" -X POST http://localhost:5000/users
curl -d '{"timestamp":"2021-06-15T09:00:00Z", "position": { "type": "Point", "coordinates": [20,30]}}' -H "Content-Type: application/json" -X POST http://localhost:5000/vehicleStates

Testing

Unit and integration test (using a PostGIS Container) are provided. Running integration tests requires docker in your path.

To run unit tests:

go test -short ./...

To run all tests:

go test ./...

About

A simpel example using go to provide a RESTful API with PostGIS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors