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