Oracle Magazine, July/August 2018
Database Developer OPEN SOURCE performance and scalability by creating groups of connections that stay open and are reused many times Because node oracledb is built on top of the Oracle Call Interface OCI client libraries it has built in support for creating OCI pools which work on the client side and have excellent performance characteristics To create a connection pool start by creating a new configuration file named database js in the config directory Copy and paste the following code into the file and save your changes ORACLE MAGAZINE JULY AUGUST 2018 85 module exports hrPool user process env HR_ USER password process env HR_ PASSWORD connectString process env HR_ CONNECTIONSTRING poolMin 10 poolMax 10 poolIncrement 0 As with the config webserver js file in Part 1 of this series this file enables some properties to be set via environment variables Using environment variables provides flexibility when deploying the app to different environments and helps keep passwords and other sensitive information out of source code Run the following commands from a terminal to set the required environment variables and ensure that theyre available in future terminal sessions
You must have JavaScript enabled to view digital editions.