Using PKI Express on Node.js
This article describes how to use PKI Express on Node.js
Sample project
The sample project shows the usage of PKI Express together with the Web PKI browser component on a NodeJS project. It is hosted on GitHub:
https://github.com/LacunaSoftware/PkiSuiteSamples/tree/master/nodejs/expressmvc
Running the project
- Install PKI Express
- Download the project or clone the repository
- In a command prompt, navigate to the folder
NodeJS/expressMVC
and run the commandnpm install
to download the dependencies - Run the web application:
npm start
- Access the URL: http://localhost:3000
If you use Yarn, you can use
yarn install
oryarn
to download the dependencies andyarn start
to run the application.
NPM package
In order to use PKI Express on Node.js, you must includ the NPM package pki-express
To add it to your project, add the line below to your package.json
file:
{
"dependencies": {
"pki-express": "1.10.2"
}
}
After that, do a npm install
to download the package and its dependencies.
The package is open-source, hosted on GitHub. Feel free to fork it if you need to make any customizations, and even submit an pull request.