1

In NodeJS, I am logging every every API request and would get the log through another API request . But I do not want to use MONGODB or any such database. I am currently writing to file each API request in JSON format. But now API requests are much quicker and sometimes file is busy before another request comes.

What would be the best solution in this case?

Actually I am developing a portable and distributable solution. So database will hinder the motive.

Bhavya Gupta
  • 186
  • 2
  • 12
  • 1
    Consider writing to different files depend on the service(if your working iwht micro services) or if not, use queue to write to file, send it to 1 provider that handle it. – Talg123 Oct 28 '20 at 05:14
  • @Talg123 Sorry to ask, but any basic code? I don't know anything about queues. – Bhavya Gupta Oct 28 '20 at 11:19

0 Answers0