Skip to content

Utkal97/Dictionary-Backend

Repository files navigation

Dictionary-Backend

A dictionary server built using Nodejs, Expressjs and MongoDB. The server serves data of words when requested. The server is currently hosted on Heroku platform with link.

Installation :

  1. Install Nodejs and npm and MongoDB.
  2. Clone the repository to your device.
  3. npm install to install the required dependencies.
  4. Change the mongoose connection string (DB_CONNECT) to your own string that connects to your MongoDB cluster.
  5. npm start to start the server.

Usage

API calls supported :

  1. GET '/word/<your_word>/definitions' :
    Returns definitions of the requested word.
    Output format : List of Strings

  2. GET '/word/<your_word>/antonyms' :
    Returns antonyms of the requested word.
    Output format : List of Strings

  3. GET '/word/<your_word>/synonyms' :
    Returns synonyms of the requested word.
    Output format : List of Strings

  4. GET '/word/<your_word>/examples' :
    Returns examples of the requested word.
    Output format : List of Strings

  5. GET '/word/<your_word>/allInfo' :
    Returns all the information of the requested word.
    Output format : Object containing information

  6. GET '/words' :
    Returns a random word with all its information.
    Output format : Object containing information