Usage in Node Js
fwt-parth-jariwala opened this issue · 7 comments
I have extracted zip file in my nodejs project and it has created a new directory in it. Now how can i use it to convert my postgres sql file to sqlite db conversion?
HI, as explaind in README file you need to run it with following arguments:
java -jar pg2sqlite-1.0.3.jar -d database.dump -o sqlite.db
The way to run it is not related to Node.js. You should run it as a separate process, as an external program. In the end, it is executed on the JVM and does not know anything about Node.
I am runnig on ubuntu 20.04 and when i run command
java -jar pg2sqlite-1.0.3.jar -d database.dump -o sqlite.db
it gives me error:command not found: java
Obviously you need to install java:
sudo apt install openjdk-21-jre
so then you can run pg2sqlite-1.0.3.jar
Can you tell me how can i run it node js?
Can you tell me how can i run it node js?
https://stackoverflow.com/questions/20643470/execute-a-command-line-binary-with-node-js