Skip to content

arshvin/test-task

Repository files navigation

Example of test Webapp and its deploy.

Purpose

The Webapp exposes REST-API through which an user can gather information about:

  1. number of available CPUs for app (/cpu path)
  2. number of IPv4 addresses and name of interfaces to which these IPs have assigned (/ip path)
  3. current date (/date path)
  4. current time (/time path)

It's supposed that this app will have implementations in few languages. Currently there are following language implementation:

  1. java
  2. golang

How to use it

To deploy and for trying it, a number of steps have to be done:

  1. Install VirtualBox and Vagrant environments for Linux
  2. Clone this repository from shell
  3. Go to the cloned repository directory, launch command vagrant up and wait until the machine will be provisioned
  4. Invoke the commands:
for item in cpu ip date time; do
    echo "Requesting of item $item: ";
    curl -s -L --insecure http://localhost:8080/$item | python -m json.tool;
done

and watch the output

  1. Once it's done, to remove the VM, the command is helpful:
vagrant destroy default

About

Interview task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors