A simple text analyzer api.
- NestJs
- NodeJs
- TypeScript
docker compose up --build
Use the following for production build.
docker compose -f docker-compose.prod.yml up --build
List of available endpoints.
- http://localhost:3000/text-analyzer/word-count
- http://localhost:3000/text-analyzer/character-count
- http://localhost:3000/text-analyzer/sentence-count
- http://localhost:3000/text-analyzer/paragraph-count
- http://localhost:3000/text-analyzer/longest-words
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
Have the development container running.
docker exec -i -t <CONTAINER_NAME/ID> bash
npm run test
npm run test:e2e
npm run test:cov