Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

camilo0365/camilo-entersekt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assessment for Entersekt

By Camilo Prieto Arciniegas (camilo.prieto93@gmail.com)

This project uses Spark, the Java minimalistic Web framework, to provide the requested API.

How to build

$ docker build -t camilos-image .

Note: The initial build will take a while because we're installing Maven, Tini (see dockerfile comments) and all the project's and Maven's dependencies. It will pay off :)

How to run the container

To run it with attached TTY (to see the logs, for instance):

$ docker run -i -t --rm --name camilos-container -p 8080:8080 camilos-image

Note: Ctrl-C will stop the server smoothly :)

To run it in detached mode:

$ docker run -d --rm --name camilos-container -p 8080:8080 camilos-image

How to use

Make a POST request to http://localhost:8080/inspect with Content-Type: application/json and a body as follows:

{
  "path": "/the/path/to/the/directory"
}

Example using cURL:

$ curl -X POST \
    http://localhost:8080/inspect \
    -H 'content-type: application/json' \
    -d '{
  	"path" : "/usr/bin"
  }'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages