Question:
How do you install the sample Node.js validation service?
Answer:
Before installation, take note of the following points about the Validation service.
- It's not required to run your validation service on the same DocuWare server.
- In order to run this as a Windows Service, please follow the following KBA-36386 · DocuWare Support Portal
- You can host the validation service on platforms like Microsoft Azure, Cloud9 or Heroku.
For the installation, the following must be done.
NOTE: The NodeJS Validation Service can be found here, GitHub - DocuWare/Validation-NodeJS-samples
- Install the latest version of NodeJS, which can be found at this link: https://nodejs.org/en/
* Install with all options activated
* Refer to the following link for a brief tutorial on installation: https://nodesource.com/blog/installing-nodejs-tutorial-windows/
- Clone the sources: 'git clone https://github.com/DocuWare/Validation-NodeJS-samples.git'
- In the command prompt, navigate to the folder where the sample app was cloned.
- Enter the following command for installing all required NodeJS modules: 'npm install'
- Edit & check all settings from DWValidationSettings.js file that comes with the application.
- Go back to the command prompt and start the application with the following command: 'node server.js'
Now a message will appear saying that the validation service was started successfully.
After the service has successfully started, you can now work on setting up your own validations using NodeJS, which involves the following,
- Install Visual Studio Code as an editor for NodeJS. Follow this tutorial: https://code.visualstudio.com/docs/nodejs/nodejs-tutorial
- Load the workspace folder of the sample application into Visual Studio Code.
- Lastly, modify the ValidationsBeforeStoring.js according to your needs.
Once completed, you should have a Validation service that you can use when storing documents.
KBA is applicable for both Cloud and On-premise Organizations.