UNPKG

@thgh/tunnelmole

Version:

Tunnelmole, an open source ngrok alternative. Instant public URLs for any http/https based application. Available as a command line application or as an NPM dependency for your code. Stable and maintained. Good test coverage. Works behind firewalls

23 lines (17 loc) 410 B
import fs from 'fs'; import { LocalStorage } from 'node-localstorage'; import os from 'os'; let storage: LocalStorage; const initStorage = async () => { const homedir = os.homedir(); const dir = homedir + '/' + '.tmole.sh'; if (!fs.existsSync(dir)){ fs.mkdirSync(dir); } storage = new LocalStorage(dir + '/local-storage'); return; } export { initStorage, storage }