A simple file upload service that processes documents using VisionFi.
- Install dependencies:
npm install-
Create a
visionfi_service_account.jsonfile in the root directory with your VisionFi service account credentials. -
Start the server:
node server.jsThe server will run on http://localhost:3000
-
Create a new Web Service on Render
-
Connect your repository
-
Set the following environment variables in Render:
PORT: The port number (Render will set this automatically)
-
Add your service account credentials as a secret file:
- In the Render dashboard, go to your service's "Environment" section
- Click "Add Secret File"
- Name:
visionfi_service_account.json - Content: Paste the entire contents of your service account JSON file
- The file will be available at
/etc/secrets/visionfi_service_account.jsonin your application
PORT: The port number the server will run on (default: 3000)VISIONFI_SERVICE_ACCOUNT: (Optional) JSON string containing VisionFi service account credentials. Only used if secret file is not available.
server.js: Main application fileviews/: EJS template filesindex.ejs: Upload pageresult.ejs: Results page
uploads/: Temporary storage for uploaded filespublic/: Static files (if any)