We will have our user interacting with the project and we will have a server running with golang & go server at PORT:3000.
The go server will interact with the REDIS server which is our database at PORT:6379.
Three major components:
- api
a. Database : logic to connect to the database.
b. Helpers : will have some functions to help the routes.
c. Routes : routes on which we will post and shorten our URL.
d. Dockerfile : to have golang specific code. - data
- db
a. Dockerfile : Going to contain some container for our redis database.
to install all the dependencies go to "api" directory and execute command: 'go mod tidy'
The above command will intall all the dependencies.
docker-compose up -d