A simple Node.js-based API that provides dictionary functionalities, including word meanings and random word generation.
- 🔍 Fast word lookup with detailed meanings
- 🎲 Random word generation capabilities
- 📝 Comprehensive word definitions
- ⚡ Lightweight and efficient
- 🛡️ Built-in input validation
- 🚀 Easy to integrate
- 💻 Developer-friendly responses
- URL:
/meaning/:word - Method:
GET - Description: Returns the meaning of the specified word.
- Examples:
- Request:
/meaning/hello{ "word": "hello", "meaning": "A greeting or expression of goodwill." } - Error (Invalid Input):
/meaning/123{ "error": "Invalid input. Please enter a valid word." } - Error (Word Not Found):
/meaning/nonexistentword{ "error": "Word not found" }
- Request:
- URL:
/randomWord - Method:
GET - Description: Returns a random word.
- Example:
- Response:
{ "word": "serendipity" }
- Response:
- URL:
/randomWordWithMeaning - Method:
GET - Description: Returns a random word along with its meaning.
- Example:
- Response:
{ "word": "serendipity", "meaning": "The occurrence of events by chance in a happy or beneficial way." }
- Response:
- URL:
/meaning/ - Method:
GET - Description: Informs the user to provide a word when no word is entered.
- Example:
- Response:
{ "error": "Please provide a word to search for its meaning." }
- Response:
- Clone the repository:
git clone https://github.com/your-username/Dictionary-API.git cd Dictionary-API