{"id":36543352,"url":"https://github.com/jet2jet/cgi-express","last_synced_at":"2026-01-12T05:51:29.791Z","repository":{"id":57196481,"uuid":"361117936","full_name":"jet2jet/cgi-express","owner":"jet2jet","description":"Executes Express.js application as CGI program.","archived":false,"fork":false,"pushed_at":"2023-02-04T04:40:57.000Z","size":184,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-23T18:01:36.462Z","etag":null,"topics":["cgi","cgi-script","express-js","expressjs","web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jet2jet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-24T09:11:04.000Z","updated_at":"2022-12-23T04:38:09.000Z","dependencies_parsed_at":"2023-02-18T13:46:30.579Z","dependency_job_id":null,"html_url":"https://github.com/jet2jet/cgi-express","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/jet2jet/cgi-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fcgi-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fcgi-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fcgi-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fcgi-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jet2jet","download_url":"https://codeload.github.com/jet2jet/cgi-express/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fcgi-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgi","cgi-script","express-js","expressjs","web"],"created_at":"2026-01-12T05:51:29.696Z","updated_at":"2026-01-12T05:51:29.786Z","avatar_url":"https://github.com/jet2jet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cgi-express\n\n[![NPM version](https://badge.fury.io/js/cgi-express.svg)](https://www.npmjs.com/package/cgi-express)\n[![Build Status](https://api.travis-ci.com/jet2jet/cgi-express.svg?branch=main)](https://www.travis-ci.com/jet2jet/cgi-express)\n\n\\[EXPERIMENTAL; Not tested well\\] Executes Express.js application as CGI program.\n\n\u003e - Since this library is not tested well, please be HIGHLY CAREFUL with using this in production.\n\u003e - This library may be uncompatible with some CGI executors.\n\n## Requirements\n\n- Express.js (tested with 4.x)\n  - For TypeScript, `@types/express` is necessary to build\n- Node.js \u003e=10\n\n## Example\n\n```js\n#!/usr/bin/env node\nconst express = require('express');\nconst cgiExpress = require('cgi-express');\n\nconst app = express();\n// initialize 'app' as usual Express.js application here...\n\n// call 'execute' with the default configuration\n// (using process.stdout, process.stdin, and process.env)\ncgiExpress.execute(app);\n```\n\n## API\n\n### `function execute(app: express.Application, opts?: Options): Promise\u003cvoid\u003e`\n\nExecutes Express.js application as a CGI program. This function uses `process.stdin`,\n`process.stdout`, and `process.env` properties as default.\n\n#### Parameters\n\n- `app` -- An Express.js application instance\n- `opts` -- Additional options (`Options`) for execution\n\n#### Returns\n\nPromise object which resolves when execution finishes\n\n### `function executeCore(app: express.Application, opts?: Options \u0026 Required\u003cPick\u003cOptions, 'stdin' | 'stdout' | 'env'\u003e\u003e): Promise\u003cvoid\u003e`\n\nExecutes Express.js application as a CGI program, with custom stdin/stdout/env data.\n\n#### Parameters\n\n- `app` -- An Express.js application instance\n- `opts` -- Additional options (`Options`) for execution (stdin/stdout/env are not omittable)\n\n#### Returns\n\nPromise object which resolves when execution finishes\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjet2jet%2Fcgi-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjet2jet%2Fcgi-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjet2jet%2Fcgi-express/lists"}