Testing using stream through a CLI created with NestJS for converting a very large log file to another format
$ yarn
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# unit tests
$ yarn test
After running the yarn build command, run the command:
$ node dist/main convert origin destination
To transform the log with more records to test a larger volume (10.368.000 records).
$ node dist/main convert https://mjpsolucoes.com.br/logs/input-01.txt output/minhaCDN.txt
The logs will be stored in the ./logs/*
folder.
After running the command, the output should look like the image below:
- Author - Junior Martins
- Website - juniormartins.dev
- Twitter - @juniormartinxo