Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.17 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.17 KB

Text Analyzer

A simple text analyzer api.

💻 Technologies

  • NestJs
  • NodeJs
  • TypeScript

🚀 Getting started

Docker

docker compose up --build

Use the following for production build.

docker compose -f docker-compose.prod.yml up --build

📍 API Endpoints

List of available endpoints.

GET

POST

Send the text in the body of the post.

Curl example.

curl -X POST \
      -H "Content-Type: application/json" \
      -d '{"text": "The quick brown fox jumps over the lazy dog. The lazy dog slept in the sun."}' \
      http://localhost:3000/text-analyzer/word-count

🧪 Running Tests

Have the development container running.

docker exec -i -t <CONTAINER_NAME/ID> bash
npm run test
npm run test:e2e
npm run test:cov