Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rgl/node-external-process-promises-example

example Node.js application starts an external process and parses its output to resolve two promises
https://github.com/rgl/node-external-process-promises-example

child-process external-process javascript node promise promises typescript

Last synced: 25 days ago
JSON representation

example Node.js application starts an external process and parses its output to resolve two promises

Awesome Lists containing this project

README

        

# About

[![Build](https://github.com/rgl/node-external-process-promises-example/actions/workflows/build.yml/badge.svg)](https://github.com/rgl/node-external-process-promises-example/actions/workflows/build.yml)

This example Node.js application starts an external process and parses its output to resolve two promises.

This is implemented by the `startApp` function, which is used as:

```typescript
const { verificationUrlPromise, claimsPromise } = startApp();

console.log("verification url:", await verificationUrlPromise);
console.log("claims:", await claimsPromise);
```

# Usage

Install [Node.js](https://nodejs.org).

Install the dependencies:

```bash
npm ci
```

Run the example:

```bash
npm run example
```