---
title: "Using PKI Express on Node.js"
description: "Using PKI Express on Node.js with the sample project on GitHub, which also uses Web PKI, and the steps to run it with npm."
canonical: "https://docs.lacunasoftware.com/en-us/articles/pki-express/nodejs"
locale: "en"
product: "PKI Express"
last_updated: "2026-10-12"
---

# Using PKI Express on Node.js

This article describes how to use [PKI Express](https://docs.lacunasoftware.com/en-us/articles/pki-express) on Node.js

## Sample project

The sample project shows the usage of PKI Express together with the [Web PKI](https://docs.lacunasoftware.com/en-us/articles/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

1. [Install PKI Express](https://docs.lacunasoftware.com/en-us/articles/pki-express/setup)
1. [Download the project](https://github.com/LacunaSoftware/PkiSuiteSamples/archive/master.zip) or clone the [repository](https://github.com/LacunaSoftware/PkiSuiteSamples.git)
1. In a command prompt, navigate to the folder `nodejs/expressmvc` and run the command `npm install` to download the dependencies
1. Run the web application: `npm start`
1. Access the URL: [http://localhost:3000](http://localhost:3000)

> If you use [Yarn](https://yarnpkg.com), you can use `yarn install` or `yarn` to **download the dependencies** and
> `yarn start` to **run the application**.

### NPM package

In order to use PKI Express on Node.js, you must includ the NPM package [pki-express](https://www.npmjs.com/package/pki-express)

To add it to your project, add the line below to your `package.json` file:

```json
{
    "dependencies": {
        "pki-express": "1.16.2"
    }
}
```

After that, do a `npm install` to download the package and its dependencies.

The package is open-source, hosted on [GitHub](https://github.com/LacunaSoftware/PkiExpressNode). Feel free to fork it if you need to make any customizations, and even submit an *pull request*.

**Demos and samples**

- Timestamp a PDF with PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/timestamp-pdf-express.js)
- Sign a file with CAdES and a server key using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/cades-server-key-express.js)
- Sign an XML document using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/xml-signature-express.js)
- Sign an XML document with a server key using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/xml-server-key-express.js)
- Sign a Brazilian NF-e using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/xml-nfe-signature-express.js)
- Make a printer-friendly version of a signed PDF using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/printer-version-pades-express.js)
- Make a printer-friendly version of a CMS/CAdES signature using PKI Express: [Node.js](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/nodejs/expressmvc/routes/printer-version-cades-express.js)
