Answer the question
In order to leave comments, you need to log in
How to find the directory of a module loaded with require("module")?
I accidentally discovered the existence of the _homedir variable:
let module1 = require("module");
console.log(module1._homedir); // выдает путь к каталогу с модулем
Answer the question
In order to leave comments, you need to log in
MikroTik RB951G-2HnD is 100% suitable for all your requirements, including the price.
1. Buy an old cheap computer, add an additional network card if necessary;
2. Put Pfsence there (http://macrodmin.blogspot.ru/2011/11/ustanovka-pfsense.html)
3.…
4. Profit!
But seriously, Pfsence is an excellent distribution that is built on the basis of FreeBSD. Very easy to set up via the web interface. There are a large number of packages that can be added and configured again via the web interface.
I myself assembled several gateways on it with various services: squid, VPN (PPTP, IPsec, OPenVPN), Guest Wifi with access by vouchers. They work stably.
at home I use asus RT-n16 - a gigabit switch, 128M RAM 32 flash. 100 Mbit from the provider pulls without problems. I use tomato firmware from shibby. previously there were problems with the disappearance of wifi, but since three releases ago the problem has disappeared.
I recommend taking a look.
I don’t have many consumers (HP microserver (Torrents, DLNA, ftp, web, subsonic, proxy, TS), 2 beeches, TV, receiver, phones, tablets, toys), but there are no problems with the band.
Asus RT-N66U - tested on Beeline and a number of other providers. both at home and in offices.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question