Reputation: 1035
i know that node.js is relativity new.. so i hope that someone here can really help me.
i want to make a simple server-client program that works on windows 7.
i am having some problem in creating a file module.
i have one file lets call it a.js
/* a.js file*/
var net = require('net');
function startServer(port,resourceMap,rootFolder){
//does somthing
}
exports.startServer=startServer;
and then another file b.js in the same folder
/* b.js file*/
var server = require('*.*\a');
for some reason when i try to run the command node b.js it tells me that it does not recognize the module.
i know that in linux
var server = require('./a');
should work. but i searched allot and all the examples that i find are only linux.
i know that it is probably smothing stupid, but i cant seem to find it.
thank you
Upvotes: 2
Views: 250
Reputation: 17400
I don't know what you think that this code block is supposed to do:
var server = require('*.*\a');
Node.js normalizes disk paths between Linux and Windows so using var server = require('./a');
will work just fine on Windows.
Upvotes: 1