Discover Packages
github.com/nazarslota/unotes/note
module
Version:
v0.0.0-...-f767cfc
Opens a new window with list of versions in this module.
Published: Aug 20, 2023
License: MIT
Opens a new window with license information.
README
README
¶
Note
This microservice is written in Go and implements a gRPC service,
utilizing gRPC Gateway for HTTP/REST endpoint compatibility
and Swagger for API documentation. It also integrates with MongoDB
for data storage and Docker for easy deployment.
Run
Docker
You must have Docker installed.
Now in the main folder of the project you need to create an .env
file in which you need to configure to add the
following environment variables.
NOTE_ACCESS_TOKEN_SECRET=
NOTE_MONGODB_HOST=
NOTE_MONGODB_PORT=
NOTE_MONGODB_USERNAME=
NOTE_MONGODB_PASSWORD=
NOTE_MONGODB_DATABASE=
Now run the following commands to build and run the Docker container.
docker build --tag note .
docker run --publish 8082:8082 --publish 8092:8092 --name note --detach --restart always --env-file ./.env note
Docker Compose
You must have Docker
and Docker Compose installed.
Now in the main folder of the project you need to create an .env
file in which you need to configure to add the
following environment variables.
NOTE_ACCESS_TOKEN_SECRET=
NOTE_MONGODB_HOST=
NOTE_MONGODB_PORT=
NOTE_MONGODB_USERNAME=
NOTE_MONGODB_PASSWORD=
NOTE_MONGODB_DATABASE=
Now you need to run the following command.
docker-compose up --detach --build --remove-orphans
Development
Prerequisites
Dependencies
make dependencies
Other
Code generation.
make protobuf
Plugins install.
make protoplugins
Plugins.
make swagger
Environment variables
NOTE_ACCESS_TOKEN_SECRET=
NOTE_MONGODB_HOST=
NOTE_MONGODB_PORT=
NOTE_MONGODB_USERNAME=
NOTE_MONGODB_PASSWORD=
NOTE_MONGODB_DATABASE=
Expand ▾
Collapse ▴
Directories
¶
api
proto
Package proto is a reverse proxy.
Package proto is a reverse proxy.
cmd
internal
storage
Package storage provides storage implementations.
Package storage provides storage implementations.
storage/mongo
Package mongo provides a MongoDB database repository implementation.
Package mongo provides a MongoDB database repository implementation.
Click to show internal directories.
Click to hide internal directories.