Prerequisite:-NodeJS should be installed.
This blog is for those who are working on the Express-node-oracle db stack. I haven't seen enough sources about this on the internet also when I tried to connect the node with the oracle schema instance. The setup includes three main steps:
- Install Oracle Instant Client : (IF Backend is Oracle).
steps to install Oracle Instant Client:
1. Download Oracle Instant Client from the below URL
https://www.oracle.com/in/database/technologies/instant-client/winx64-64-downloads.html
- Extract the zip file to a new folder.
Sample path to extract files: C:\Program Files\OracleClient\instantclient_19_9\
Add the path (C:\Program Files\OracleClient\instantclient_19_9\) in a path environment variable.
Set ORACLE_HOME environment variable if already not set.
2) Install URL Rewrite & Application Request Routing in IIS
Request routing in Internet Information Services (IIS) refers to the process of directing incoming requests to specific server resources based on the URL or other request information. This is typically done by defining rules or routes in the IIS configuration that map incoming requests to specific folders, files, or applications. The goal of request routing is to provide a flexible and scalable way to manage web traffic and serve dynamic content to users based on their requests.
- Download Setup from the below URL and install :
a) Application Request Routing
https://www.iis.net/downloads/microsoft/application-request-routing
b) URL Rewrite
https://www.iis.net/downloads/microsoft/url-rewrite
- Enable Reverse Proxy Functionality in IIS:
Open IIS -> URL Rewrite -> Add Rule -> Reverse Proxy -> Enable Proxy Functionality.
3) Install PM2 (Process Manager for NodeJS):
Install pm2 directly using "npm install pm2 -g" or
- Copy and paste the contents of file pm2.zip to the below path
Path : C:\Users\<Name of User> \AppData\Roaming\npm
Note: <Name of User> should be the user under which the node is installed.
2.Edit Environment variable – give pm2 installation path (C:\Users\<Name of User> \AppData\Roaming\npm) in the Environment variable.
follow these steps to complete the node oracle connection setup and then it will be easy to connect with the oracle db in the code itself with simple steps that I will provide in my next blog. May it helps, Thank you.
follow me on LinkedIn: https://linkedin.com/in/arjun-vijay-4b3a38147
GitHub: https://github.com/Arjuuun2
support(optional🙃): https://www.buymeacoffee.com/arjunvijayE
#WeMakeDevs