# first time only command
make docker-contexts
# add ssh key to remotes# rename .env.template to .env# add secrets
make down
make deploy
# when done
make deploy-down
dev
docker
# rename .env.template to .env# add secrets
make down
make dev
# get the doc in json and html :)
curl http://localhost:8080/api/swagger/doc.json
curl http://localhost:7000/api/swagger/index.html
locally
# rename .env.template to .env# add secrets
make down
make infrastructure
go run ./...
test
docker
# rename .env.template to .env# add secrets
make down
make test
locally
# rename .env.template to .env# add secrets
make down
make infrastructure
go test ./...
benchmark
make infrastructure
# run the importercd be/internal/usecase/repo
go test -run=^$ -bench=.
{"error":"(NoQueryExecutionPlans) error processing query: ns=barber-deploy.barbershopsTree: GEONEAR field=location maxdist=10 isNearSphere=0\nSort: {}\nProj: {}\n planner returned error :: caused by :: unable to find index for $geoNear query"}
The Imported Database is currently not up to speed with the changes made to the Testing Database during development.
We have to address the following issues:
Rename id fields
Salt and hash stored passwords
Add Mongo index to enable Geolocation
Revert location info to the Mongo Geolocation format
Rename the Barbershop's "location" field to "address"
Add "status" field to Appointement ("pending"/"completed"/"canceled")
Remove Review reporting
Round up an Appointment's "startDate" to the nearest half hour
Slot functionality has to be rewritten in order to prevent accessing both MongoDB and Redis each time.
Ideally, Redis and Mongo should only be accessed together when:
Creating a new Appointment
Completing or Deleting an Appointment
Redis should be accessed by itself when:
Reading an appointment list for a BarberShop
In order to achieve this a couple of changes have to be implemented:
SetHoliday is removed, the Employees field of a BarberShop is now what gets updated
Slot now has available employees, instead of Unavailable