- install mongodb compass
- install nodejs if you don't have it already
- open the terminal in the project folder
- type
npm i
- install Git Bash
- copy target files into a new folder
- Open Git Bash in that new folder, if it doesn't already show in the right click menu then check this
- type
split `TargetFileName` `NewFileName` -l `number of lines` -a 3 -d
without the backticks. an ex of number of lines50000
- create a new folder named "txt" in the project folder and copy the output files into it
- open the app.ts and replace the filePaths with the new output files names can be done using this
- make sure that mongodb compass is running and click connect
- then type in the terminal
npm run dev
in the project folder where the app.ts file is located
- type
npm install -g ts-node typescript '@types/node'
in a terminal
- replace the f1.txt in decode.ts with target file
ts-node decode.ts
in this db we use the phone numbers as ids as primary keys since a single account can have more than one number which would result in user already exists error in mongodb