Beegone is a CRUD app built to manage vehicle licence plate registrations.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
$ git clone https://github.com/ICanHaz/beegone.git
$ cd beegone
The project's structure follows conventions as described in Standard Go Project Layout
App is split into 2 binaries with entry points located at:
cmd/
├── api
│ └── main.go
├── server
└── main.go
Api consists of 5 endpoints:
curl -X GET \
http://localhost:9090/api/carplates \
-H 'Content-Type: application/json'
curl -X POST \
http://localhost:9090/api/carplates \
-H 'Content-Type: application/json'
-d '{
"plateId": "AAA-300",
"modelName": "Batmobile Outback",
"modelYear": "1990",
"owner": "Driver 2"
}
curl -X GET \
http://localhost:9090/api/carplates/1Q4GX5yPW3KxDuJ9k9XIplGwCTh \
-H 'Content-Type: application/json'
curl -X PUT \
http://localhost:9090/api/carplates \
-H 'Content-Type: application/json'
-d '{
"id": "1PLaFaOOuyXv3ja3eLfUPyDy3de",
"plateId": "AAA-201",
"modelName": "Old car",
"modelYear": "2000",
"owner": "Driver 2"
}'
curl -X DELETE \
http://localhost:9090/api/carplates/1PLaC8WRVwz08V0ZUEekSSQViUP \
-H 'Content-Type: application/json'
The simplest way to run the app is with Docker Compose:
$ docker-compose up -d
Go to http://localhost:9000/ to see results
If you wish to run app components separately:
To run api:
make run-api
To run server:
make run-server
make run-integration-tests
make run-unit-tests