Backend for this repository.
Finds difficulty ratings, definitions, and synonyms of words by sending requests to dictionary.com. Results are cached to avoid sending repeated requests.
- GET
/get_definition- key: word
- returns: {definition: (string)}
- GET
/get_difficulty- key: word
- returns: {difficulty: (int)}
- GET `/get_synonym
- key: word
- returns: {difficulty: (string)}
- POST
/get_definitions- key: words (array of strings)
- returns: {(dict of key=word, val=(string))}
- POST
/get_difficulties- key: words (array of strings)
- returns: {(dict of key=word, val=(int))}
- POST
/get_synonyms- key: words (array of strings)
- returns: {(dict of key=word, val=(string))}
(the bulk endpoints are POST because GET urls become too long)
A barebones Node.js app using Express 4.
This application supports the Getting Started with Node on Heroku article - check it out.
Make sure you have Node.js and the Heroku Toolbelt installed.
$ git clone git@github.com:heroku/node-js-getting-started.git # or clone your own fork
$ cd node-js-getting-started
$ npm install
$ npm startYour app should now be running on localhost:5000.
$ heroku create
$ git push heroku master
$ heroku open
For more information about using Node.js on Heroku, see these Dev Center articles:
