Giter Club home page Giter Club logo

beegone's Introduction

Beegone

Beegone is a CRUD app built to manage vehicle licence plate registrations.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Installing

  • Clone the project to any directory outside GOPATH
$ git clone https://github.com/ICanHaz/beegone.git
$ cd beegone

Project's structure

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 endpoints

Api consists of 5 endpoints:

  • (GET) /api/carplates - Gets all carplates
curl -X GET \
  http://localhost:9090/api/carplates \
  -H 'Content-Type: application/json'
  • (POST) /api/carplates - Adds a new carplate
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"
}
  • (GET) /api/carplates/:id - Retrieves carplate with given id
curl -X GET \
  http://localhost:9090/api/carplates/1Q4GX5yPW3KxDuJ9k9XIplGwCTh \ 
  -H 'Content-Type: application/json' 
  • (PUT) /api/carplates - Updates carplate
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"
}'
  • (DELETE) /api/carplates/:id
curl -X DELETE \
  http://localhost:9090/api/carplates/1PLaC8WRVwz08V0ZUEekSSQViUP \
  -H 'Content-Type: application/json'  

Running

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

Testing

  • To run integration tests, run:
make run-integration-tests
  • To run unit tests, run:
make run-unit-tests

Built With

beegone's People

Contributors

jmazionis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.