Skip to content

hbl-ngocnd1/dictionary

Repository files navigation

tests Deploy to Amazon ECS Coverage Status

Overview

  1. Dictionary execution get list word from japanesetest4you with level is n1~n5

  2. With one word was show in the main page, use one goroutine to concurrency get detail info in look like detail page

  3. After get detail info, use google translate api to bulk and concurrency translated english mean to vietnamese mean

  4. Save data to global variable(cache in memory) after first request from server start, data was get from cache

Code Architecture

Use Clean Architecture reference this blogs

Database

In dictionary feature not use database.

But in the future can be use elastic search or self build in search engine like this to search future

Prerequisites

You'll need the following:

1. Clone the app

Now you're ready to start working with the simple Go hello world app. Clone the repository and change to the directory where the sample app is located.

git clone https://github.com/hbl-ngocnd1/dictionary
cd dictionary

Peruse the files in the dictionary directory to familiarize yourself with the contents.

2. Run the app locally use air

Create .env file

CLOUDANT_URL=dasdsa
GOOGLE_APPLICATION_API_KEY=sss
DEBUG=true
SYNC_PASS=123456

Build and run the app.

air

View your app at: http://localhost:8080