Since that we use TypeScript so we can have Interfaces 1. Install all necessary package > npm install -g ts-node > npm install -g typescript //npm install ts-node --save-dev 2. To compile into .js file > tsc filename.ts 3. To execute the typescript file so it will get converted to .js > ts-node typescript-file.ts in models/extract-pg-schema, to compile src/*.ts into /build/*.js > tsc C:\Workspace\Penta\penta-ccpa\Privacy_Lock_Demonstrator\Client\models\extract-pg-schema\extract-pg-schema>tsc //TODO we need to create the tsconfig.json for run and build .ts file https://stackoverflow.com/questions/10729276/how-can-i-get-the-full-object-in-node-jss-console-log-rather-than-object https://stackoverflow.com/questions/33535879/how-to-run-typescript-files-from-command-line https://javascript.plainenglish.io/how-to-run-and-debug-a-single-typescript-file-in-the-webstorm-ide-53ecf93185c1 https://www.jetbrains.com/help/webstorm/running-and-debugging-typescript.html I have install ts-node globally instead of making package dependency. I tried to link local package to the global one and that was helpful to resolve the ts-node/register issue. $ npm link ts-node C:\dev\projects\my-project\node_modules\ts-node -> C:\Program Files\nodejs\node_modules\ts-node node --require ts-node/register MongoDBDatabaseDiscovery.ts Typescript Export variables ------------------------------------------- https://stackoverflow.com/questions/38729486/typescript-difference-between-import-and-import-with-curly-braces https://stackoverflow.com/questions/15651510/can-typescript-export-a-function To have javascript to include typescript in javascript file const PSM = require('./PentaSessionManager.ts'); //make sure to have .ts //the .ts file class PentaSessionManager { } module.exports = PentaSessionManager; import KMSSymmetric from './utilities/KMSSymmetric.ts'; ^^^^^^ SyntaxError: Cannot use import statement outside a module add this line into your package.json ... "type": "module", ... ReferenceError: require is not defined ---------------------------------------------------- Make sure to remove "type": "module" in package.json Adapter Pattern design https://dev.to/carlillo/design-patterns---adapter-2pi3 https://www.youtube.com/watch?v=2PKQtcJjYvc&t=1008s //Fork github https://gist.github.com/Chaser324/ce0505fbed06b947d962 database ORM https://javascript.plainenglish.io/best-orm-libraries-for-javascript-8674c4d49119 Read const variable from other files --------------------------------------------------------------- https://stackoverflow.com/questions/7612011/how-to-get-a-variable-from-a-file-to-another-file-in-node-js Querying data oracle https://www.techiediaries.com/node-oracle-database-crud/ https://stackoverflow.com/questions/40041481/return-the-result-obtained-when-using-oracledb-npm-package https://blogs.oracle.com/opal/node-oracledb-v2-query-methods-and-fetch-tuning https://stackoverflow.com/questions/43219359/querying-large-dataset-in-oracle-database-from-nodejs Oracle Metadata --------------------------- https://blogs.oracle.com/opal/node-oracledb-110-has-enhanced-metadata http://www.dba-oracle.com/t_get_ddl_primary_foreign_key_constraints.htm https://dataedo.com/kb/query/oracle/list-all-primary-keys-and-their-columns Nodejs callback https://stackoverflow.com/questions/40041481/return-the-result-obtained-when-using-oracledb-npm-package Nodejs promise https://stackabuse.com/converting-callbacks-to-promises-in-node-js/ Oracle Constraints https://dba.stackexchange.com/questions/11047/how-to-retrieve-foreign-key-constraints-data https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1037.htm#i1576022 https://www.infoworld.com/article/2074584/quickly-viewing-oracle-database-constraints.html If typescript complains about not a function because there is .js compile file and we need to delete it