I am designing a website using node.js and I have a python file with multiple python functions in it that I am using to modify a postgreSQL database. Is it possible to run those functions using node.js or react and set the return of my python function as a variable in the javascript program? (Ex. enter primary key value in js, run a python search function to find data associated with that key value in postgres, then store that value in a list in js)
I know that very similar questions have been asked and answered but they either are running entire files or using flask/django.
If this is impossible to do with all of my limitations would it be possible to create a different python file that imports my already made file, takes arguments as shown here and use those arguments to run functions from my original file?