Simple java script

Job ID: 36434552

Budget: $10 – $30 USD

jave code test,

REQUIREMENTS, it is a test for a bigger project.
It should expose an HTTP REST interface that responds to POST requests on the
URL /analyze.
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 terms 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 terms of lexical closeness - i.e. that word that sorts lexically closest to
the provided request.
The server will store any word submitted in a local file, so it can be compared against
future requests, even across server restarts.
If no words are found to match against (as in the first request), the server will return null
for both response fields.