Backend Interview
Clean API for Backend Interview.
Setup
Quick start
Deploy it in less than 30 seconds!
Prerequisite
Running Locally
CLI
$ go get -u github.com/Pantani/replacer
$ cd $GOPATH/src/github.com/Pantani/replacer
$ make start
IDE ( GoLand )
- Run;
- Edit configuration;
- New Go build configuration;
- Select
directory
as configuration type; - Set
api
as program argument and-i
as Go tools argument;
Tools
Setup MongoDb
brew install mongodb
Docker
Running inside a Docker
docker-compose up -d
Make commands
- install Install missing dependencies. Runs `go get` internally. e.g; make install get=github.com/foo/bar
- start Start API in development mode.
- stop Stop development mode.
- compile Compile the binary.
- exec Run given command. e.g; make exec run="go test ./..."
- clean Clean build files. Runs `go clean` internally.
- test Run all unit tests.
- fmt Run `go fmt` for all go files.
- goreleaser Release the last tag version with GoReleaser.
- govet Run go vet.
- golint Run golint.
- docs Generate swagger docs.
- script-test Run tests from `test/test.sh`
Environment Variables
All environment variables for developing are set inside the .env file.
Docs
Swagger API docs provided at path /swagger/index.html
.
Unit Tests
To run the unit tests: make test
.