2018-10-28 15:07:21 +00:00
|
|
|
module.exports = (() => {
|
|
|
|
try {
|
2018-11-03 11:35:42 +00:00
|
|
|
const uWS = require(`./uws_${process.platform}_${process.versions.modules}.node`);
|
|
|
|
/* We are not compatible with Node.js domain */
|
|
|
|
process.nextTick = (f, ...args) => uWS.nextTick(f.apply(...args));
|
|
|
|
return uWS;
|
2018-10-28 15:07:21 +00:00
|
|
|
} catch (e) {
|
|
|
|
throw new Error('This version of µWS is not compatible with your Node.js build.');
|
|
|
|
}
|
|
|
|
})();
|