This is a little project about how to scraping data from marketplace using golang and gocolly library.
I'll try to sort by flow :
- Service -> is about business logic
- Repository -> is a layer between the Service and data layers of your application with an interface to perform create, read, update and delete CRUD operations. By using repositories in your application
- DTO -> is a layer that used to transform data to an object
- Presentation -> is used to present some paylod or response
- Entity -> a layer that representation from database
- Helpers -> is helper, used to handel reusable function
- Config -> is layer that handle configuration of our database
This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
Before we get started, it's important to know that before you run this code you have to make sure that Redis
is already exist and ready to run on your device. Than this code use a custom command to execute it with makefile to make more simple command like :
- make update
- make tidy
- make start
So, let start it.
- After clone this repository, just run
make update
. - Setup your
.env
file such as database connection and redis connection based on default setting on you device. - To make sure that all dependency is run well, than run
make tidy
. - Finally, you can run your project with command:
make start
. - Go to postman and set url like
http://localhost:8080/
, for information that port to run this project depend on configuratin on.env
Hopefully, it can be easily understood and useful. Thank you~