uws-pack
Version:
Repack of [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js).
12 lines (9 loc) • 495 B
JavaScript
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
let uws;
try {
uws = require(`./bin/uws_${process.platform}_${process.arch}_${process.versions.modules}.node`);
} catch (error) {
throw new Error("This version of uWS.js supports only Node.js versions 18, 20, 21 and 22 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n" + error.toString());
}
export default uws;