{"library":"node-linux-x64","title":"Node.js (Linux x64 Distribution)","description":"The `node-linux-x64` package provides a pre-compiled Node.js runtime binary specifically for Linux x64 systems, enabling projects to manage a Node.js version (e.g., v24.15.0) as a direct dependency. Node.js is an open-source, cross-platform JavaScript runtime environment built on Chrome's V8 engine, known for its event-driven, non-blocking I/O model, making it ideal for scalable network applications and server-side development. Node.js currently follows a release schedule with new major 'Current' versions every six months (April and October), which may introduce breaking changes. Even-numbered major versions transition to Long Term Support (LTS) in October, receiving 12 months of active support and a further 18 months of maintenance, focusing on stability and security. As of October 2026, Node.js is transitioning to an annual major release cycle where every major version will become an LTS release.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install node-linux-x64"],"cli":{"name":"node","version":null}},"imports":["import { readFile } from 'fs/promises';","import * as http from 'http';","import { join } from 'path';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import * as http from 'http';\nimport { readFile } from 'fs/promises';\nimport { fileURLToPath } from 'url';\nimport { dirname, join } from 'path';\n\nconst hostname = '127.0.0.1';\nconst port = 3000;\n\n// __dirname equivalent for ESM\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst server = http.createServer(async (req, res) => {\n  res.setHeader('Content-Type', 'text/plain');\n  if (req.url === '/') {\n    res.statusCode = 200;\n    res.end('Hello Node.js World!\\n');\n  } else if (req.url === '/readfile') {\n    try {\n      // Assuming a 'sample.txt' file exists in the same directory\n      const filePath = join(__dirname, 'sample.txt');\n      const content = await readFile(filePath, 'utf8');\n      res.statusCode = 200;\n      res.end(`File content:\\n${content}\\n`);\n    } catch (error) {\n      res.statusCode = 500;\n      res.end('Error reading file. Ensure \"sample.txt\" exists.\\n');\n    }\n  } else {\n    res.statusCode = 404;\n    res.end('Not Found\\n');\n  }\n});\n\nserver.listen(port, hostname, () => {\n  console.log(`Server running at http://${hostname}:${port}/`);\n  console.log(`Visit http://${hostname}:${port}/readfile (requires a 'sample.txt' file)`);\n  console.log(`To create 'sample.txt': echo \"Hello from sample.txt\" > sample.txt`);\n});","lang":"typescript","description":"This quickstart demonstrates a basic HTTP server in Node.js, handling root and `/readfile` routes. It showcases ESM syntax for importing built-in modules (http, fs/promises, path, url) and performing asynchronous file operations. It runs an HTTP server and reads a local file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}