setup and apxtri.js for setup
This commit is contained in:
		| @@ -39,7 +39,7 @@ apxtri.main = async () => { | ||||
|       .filter((f) => fs.lstatSync(f).isDirectory()) | ||||
|       .forEach(async (t) => { | ||||
|         const tribe = path.basename(t); | ||||
|         console.log(tribe); | ||||
|         //console.log(tribe); | ||||
|         if (!tribesdns[tribe]) { | ||||
|           await apxtri.setuptribe(tribe, conf); | ||||
|         } | ||||
| @@ -223,7 +223,7 @@ apxtri.runexpress = async (tribesdns, conf) => { | ||||
|       if (!doms.includes(dm)) doms.push(dm); | ||||
|       //reindex database attention check dev-ants/.. a bug was fixed | ||||
|       glob.sync(`../${t}/objects/*`).forEach((o) => { | ||||
|         console.log("reindex: ", o); | ||||
|         //console.log("reindex: ", o); | ||||
|         Odmdb.runidx(o); | ||||
|       }); | ||||
|     }); | ||||
| @@ -324,21 +324,26 @@ apxtri.runexpress = async (tribesdns, conf) => { | ||||
|   const ips = await apxtri.getip(); | ||||
|   app.listen(conf.api.port, () => { | ||||
|     let webaccess = `/api/ waits request on port:${conf.api.port} `; | ||||
|     let localhosts = "/etc/hosts for external machine\n" | ||||
|     let localnet = "/etc/hosts for your local network:\n" | ||||
|     let publicnet ="/etc/hosts for internet network:\n" | ||||
|     conf.dns.forEach((u) => { | ||||
|       webaccess += `http://${u}/api/ `; | ||||
|       localhosts+= `${ips.WAN} ${u} \n`; | ||||
|       //webaccess += `http://${u}/api/ `; | ||||
|       Object.keys(ips).forEach(ik=>{ | ||||
|         if (ik=="WANIP"){ | ||||
|           publicnet+= `${ips.WANIP} ${u} \n`; | ||||
|         }else{ | ||||
|           localnet+= `${ips[ik]} ${u} \n` | ||||
|         } | ||||
|       }) | ||||
|     }); | ||||
|     console.log(currentmod, webaccess); | ||||
|     console.log( | ||||
|       `\x1b[42m\x1b[37m${webaccess}                                                            \nOpen in your browser http(s):// ${conf.dns.join(" ")} to manage this apXtri town.                             \nCheck your network conf \n${localnet} ${publicnet}\nMore in README's project.\nTo get support ask \x1b[0m\x1b[32m in discord https://discord.gg/jF7cAkZn  ` | ||||
|     ); | ||||
|     console.log( | ||||
|       "\x1b[42m\x1b[37m                                                                                             \n", | ||||
|       "           Made with love for people's freedom, enjoy !!!                                                      ", | ||||
|       "\x1b[0m" | ||||
|     ); | ||||
|   }); | ||||
|   const localhosts= | ||||
|   console.log( | ||||
|     `\x1b[42m\x1b[37mOpen in your browser http(s):// ${conf.dns.join(" ")} to manage this apXtri town.                             \nCheck that your local machine have in /etc/hosts \n${localhosts}\nCheck README's project to learn more.\nTo get support ask \x1b[0m\x1b[32m in discord https://discord.gg/jF7cAkZn  ` | ||||
|   ); | ||||
|   console.log( | ||||
|     "\x1b[42m\x1b[37m                                                                                             \n", | ||||
|     "           Made with love for people's freedom, enjoy !!!                                                      ", | ||||
|     "\x1b[0m" | ||||
|   ); | ||||
| }; | ||||
| apxtri.main(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user