Technical test in Golang and Vue

Technical test in Golang and Vue

technical test in Golang for a recruiting process




Data model


Project setup - Backend

First, grab the latest version of Docker.

Then, pull the latest Dgraph version with:

docker pull dgraph/dgraph:v20.03.0

Let’s create a folder for storing Dgraph data outside of the container:

mkdir -p ~/dgraph

Now, to run Dgraph in Docker, it’s:

→ Run Dgraph zero

docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 \
  -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph --name dgraph \
  dgraph/dgraph:v20.03.0 dgraph zero

  • Port 8000 will be used for the web-UI
  • Port 8080 will be used for the RestAPI
  • Port 9080 will be used for the grpc API

→ In another terminal, now run Dgraph alpha

docker exec -it dgraph dgraph alpha --lru_mb 2048 --zero localhost:5080 --whitelist

→ And in another, run ratel (Dgraph UI)

docker exec -it dgraph dgraph-ratel

Load the Dgraph Schema

cd into backend/dgraph_setup/ and then hit:

 go run main_schema.go

Then, start the server

cd into backend/api/ and then hit:

 go run main.go

the web-app will be listening and serving on port 3000

Project setup - Frontend

cd into the folder technical_test_Go/frontend and install all the packages running:

npm install

Compiles and hot-reloads for development

npm run serve


Download Details:

Author: julianfrancor

Source Code:

#vue #vuejs #javascript #golang

Technical test in Golang and Vue
4.40 GEEK