# README
tire-change-workshop
Provides tire change workshop backend API's for Tire change booking practise assigment application
General info
Project contains two independent web server applications.
Each application is responsible for providing automobile tire change times and ability to book aforementioned tire change times through exposed REST API interface.
Usage
Download server binaries
Choose one of the following options:
Download Github release from https://github.com/Surmus/tire-change-workshop/releases
When running Windows
- Extract win64 folder contents from downloaded release.tar.gz
- Run application binaries:
london-server.exe manchester-server.exe
- Applications should be accessible from: Manchester tire workshop - http://localhost:9003/swagger/index.html London tire workshop - http://localhost:9004/swagger/index.html
When running Linux
- Extract linux64 folder contents from downloaded release.tar.gz
- Run application binaries:
./london-server ./manchester-server
- Applications should be accessible from: Manchester tire workshop - http://localhost:9003/swagger/index.html London tire workshop - http://localhost:9004/swagger/index.html
Using Docker
- Run docker images
$ docker run -d -p 9003:80 surmus/london-tire-workshop:2.0.1 $ docker run -d -p 9004:80 surmus/manchester-tire-workshop:2.0.1
- Applications should be accessible from: Manchester tire workshop - http://localhost:9003/swagger/index.html London tire workshop - http://localhost:9004/swagger/index.html
Build and run from source (Linux only)
- Install Golang SDK https://golang.org/
- Make sure that GOPATH env variable is set or set it manually with command
export GOPATH=~/go
- Run
make install
- Start London server
$GOPATH/bin/london-server
- Start Manchester server
$GOPATH/bin/manchester-server
- Applications should be accessible from: Manchester tire workshop - http://localhost:9003/swagger/index.html London tire workshop - http://localhost:9004/swagger/index.html
CLI options
$ ./london-server help
NAME:
london-server - London tire workshop API server
USAGE:
london-server [global options] command [command options] [arguments...]
VERSION:
v2.0.1
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--port value, -p value Port for server to listen incoming connections (default: "9003")
--verbose Enables debug messages print with SQL logging (default: false)
--help, -h show help
--version, -v print the version
$ ./manchester-server help
NAME:
manchester-server - Manchester tire workshop API server
USAGE:
manchester-server [global options] command [command options] [arguments...]
VERSION:
v2.0.1
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--port value, -p value Port for server to listen incoming connections (default: "9004")
--verbose Enables debug messages print with SQL logging (default: false)
--help, -h show help
--version, -v print the version
API documentation
Documentation is provided for both applications by Swagger and can be accessed at http://localhost:{APPLICATION_PORT}/swagger/index.html
# Packages
No description provided by the author