mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
28 lines
674 B
JavaScript
28 lines
674 B
JavaScript
try {
|
|
// The application can run `npm install process` to provide its own
|
|
// process stub; otherwise this module will provide a partial stub.
|
|
process = global.process || require("process");
|
|
} catch (noProcess) {
|
|
process = {};
|
|
}
|
|
|
|
if (Meteor.isServer) {
|
|
// Make require("process") work on the server in all versions of Node.
|
|
meteorInstall({
|
|
node_modules: {
|
|
"process.js": function (r, e, module) {
|
|
module.exports = process;
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
process.platform = "browser";
|
|
process.nextTick = process.nextTick || Meteor._setImmediate;
|
|
}
|
|
|
|
if (typeof process.env !== "object") {
|
|
process.env = {};
|
|
}
|
|
|
|
_.extend(process.env, meteorEnv);
|