The service is a simple flashcard application to studying foreign words. It's just a playground helping me to study Golang. So no guarantees here.
But if you somehow find it useful - feel free to grab my code.
How it looks like
Project consists of three main components:
- API (root folder, uses MongoDB as a storage)
- Web application (web folder)
- Mailer microservice w/ gRPC interface (mailer folder)
Environment settings to be made (by component)
API_SERVING_AT (ex. "localhost:8080")
Port needs to be exposed to the outer world.
API_MONGO_ADDR (ex. "localhost:27017")
MongoDB connection string.
API_JWT_SECRET (ex. "asdFGH123")
JWT secret to sign tokens.
API_MAILER_LISTENING_AT (ex. ":30400")
Mailer microservice serves on that port.
- MAILER_REMOTE_HOST (ex. "smtp.yandex.ru:465")
- MAILER_USER (ex. "email@example.com")
- MAILER_PASSWORD (ex. "48monkeys")
- MAILER_FROM (ex. "firstname.lastname@example.org")
- MAILER_SERVICENAME (ex. "Flip a card")
- MAILER_SERVING_AT (ex. ":30400")
WEBAPP_SERVING_AT (ex. ":4000")
Service is running in a docker container, port needs to be exposed to :80
WEBAPP_API_LISTENING_AT (ex. "localhost:8080")
This is the address and a port on what API serves. Using in JS-scripts of the app.