Skip to content

A Web Server built with Vertx which receives a post request with Json {"text":XXX } and saves the word internally and responds with closest word in a lexical term and value-wise (values are measured by the sum of letters where a=1, b=2 and so on)...

Notifications You must be signed in to change notification settings

asafs94/VertxWithWordsProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VertxWithWordsProject

Excercise <- (the projects name)

Explanation

An Excercise:

REQUIREMENTS
  1. The program will expose an HTTP REST interface that responds to POST requests on the URL /analyze.

  2. When an HTTP client POSTs a JSON object with the string property “text”, the server will compare the content of the provided “text” field to the list of words previously provided through the same API, and return a JSON response containing an object with two fields: a. The field “value” will contain the word closest to the word provided in the request in term of total character value, where character values are listed as a=1, b=2 and so on. b. The field “lexical” will contain the word closest to the word provided in the request in term of lexical closeness - i.e. that word that sorts lexically closest to the provided request.

  3. The server will store the word provided in the request locally to compare against future requests.

  4. If no words are found to match against (as in the first request), the server will return null for both response fields.

How To Use

To launch:

>mvn clean package

To run:

java -jar target/excercise-1.0.0-SNAPSHOT-fat.jar

or

java -jar target/[The-Name-Of-The-Project-Here]-1.0.0-SNAPSHOT-fat.jar

This application was generated using http://start.vertx.io

About

A Web Server built with Vertx which receives a post request with Json {"text":XXX } and saves the word internally and responds with closest word in a lexical term and value-wise (values are measured by the sum of letters where a=1, b=2 and so on)...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages