{"id":28440294,"url":"https://github.com/haxefoundation/hxnodejs","last_synced_at":"2025-06-27T14:31:23.608Z","repository":{"id":21504400,"uuid":"24823387","full_name":"HaxeFoundation/hxnodejs","owner":"HaxeFoundation","description":"Haxe externs for working with node.js","archived":false,"fork":false,"pushed_at":"2024-06-18T10:51:57.000Z","size":4339,"stargazers_count":172,"open_issues_count":31,"forks_count":61,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-06-06T03:41:53.045Z","etag":null,"topics":["extern","haxe","node-js","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"Haxe","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/HaxeFoundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-10-05T18:55:27.000Z","updated_at":"2025-05-13T19:01:20.000Z","dependencies_parsed_at":"2024-01-07T16:31:46.442Z","dependency_job_id":"8ed1292e-bdd6-4305-8296-84323cfb5b67","html_url":"https://github.com/HaxeFoundation/hxnodejs","commit_stats":{"total_commits":525,"total_committers":34,"mean_commits":"15.441176470588236","dds":"0.29714285714285715","last_synced_commit":"504066dc1ba5ad543afa5f6c3ea019f06136a82b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/HaxeFoundation/hxnodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaxeFoundation%2Fhxnodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaxeFoundation%2Fhxnodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaxeFoundation%2Fhxnodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaxeFoundation%2Fhxnodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaxeFoundation","download_url":"https://codeload.github.com/HaxeFoundation/hxnodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaxeFoundation%2Fhxnodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262273355,"owners_count":23285661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["extern","haxe","node-js","nodejs"],"created_at":"2025-06-06T03:39:25.187Z","updated_at":"2025-06-27T14:31:23.602Z","avatar_url":"https://github.com/HaxeFoundation.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"![hxnodejs](hxnodejs.png)\n\n# Haxe Node.JS\n\n[![Build Status](https://badgen.net/travis/HaxeFoundation/hxnodejs?label=build)](https://travis-ci.org/HaxeFoundation/hxnodejs)\n[![Haxelib Version](https://badgen.net/haxelib/v/hxnodejs)](https://lib.haxe.org/p/hxnodejs)\n[![Haxelib Downloads](https://badgen.net/haxelib/d/hxnodejs?color=blue)](https://lib.haxe.org/p/hxnodejs)\n[![Haxelib License](https://badgen.net/haxelib/license/hxnodejs)](LICENSE.md)\n\nExtern type definitions for Node.JS. Haxe **3.4** or newer is required.\n\nHaxe-generated API documentation is available at http://haxefoundation.github.io/hxnodejs/js/Node.html.\n\nOriginal node.js documentation can be found at http://nodejs.org/api/index.html.\n\n## Features\n\n - Full node.js API with documentation.\n - Strict typing for everything, fully leveraging Haxe type system.\n - Optionally typed event listeners.\n - Automatic insert of \"require\" statements for used modules.\n - Clean output.\n\n## Quick example\n\n1. Install hxnodejs with `haxelib install hxnodejs` (released version) or `haxelib git hxnodejs https://github.com/HaxeFoundation/hxnodejs` (latest from GitHub).\n2. Write some code and save to `Main.hx`:\n\n    ```haxe\n    class Main {\n        static function main() {\n            var server = js.node.Net.createServer(function(socket) {\n                socket.write(\"Echo server\\n\\n\");\n                socket.pipe(socket);\n            });\n            server.listen(1337, \"127.0.0.1\");\n        }\n    }\n    ```\n\n3. Compile it with with `haxe -lib hxnodejs -main Main -js main.js` (optionally add `-D js-es=6` for cleaner JavaScript output, since node.js is ES6-compliant)\n4. Look at generated `main.js`:\n\n    ```js\n    // Generated by Haxe 4.0.0-rc.2+63144f6db\n    (function ($global) { \"use strict\";\n    class Main {\n        static main() {\n            var server = js_node_Net.createServer(function(socket) {\n                socket.write(\"Echo server\\n\\n\");\n                socket.pipe(socket);\n            });\n            server.listen(1337,\"127.0.0.1\");\n        }\n    }\n    var js_node_Net = require(\"net\");\n    Main.main();\n    })({});\n    ```\n\n5. You're awesome! (See more [examples](examples))\n\n## Status\n\nThis library is considered complete, but testing and contributions are welcome. See [current issues](https://github.com/HaxeFoundation/hxnodejs/issues) and [extern guidelines](https://github.com/HaxeFoundation/hxnodejs/blob/master/HOWTO.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaxefoundation%2Fhxnodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaxefoundation%2Fhxnodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaxefoundation%2Fhxnodejs/lists"}