setup and apxtri.js for setup
This commit is contained in:
		| @@ -39,7 +39,7 @@ apxtri.main = async () => { | |||||||
|       .filter((f) => fs.lstatSync(f).isDirectory()) |       .filter((f) => fs.lstatSync(f).isDirectory()) | ||||||
|       .forEach(async (t) => { |       .forEach(async (t) => { | ||||||
|         const tribe = path.basename(t); |         const tribe = path.basename(t); | ||||||
|         console.log(tribe); |         //console.log(tribe); | ||||||
|         if (!tribesdns[tribe]) { |         if (!tribesdns[tribe]) { | ||||||
|           await apxtri.setuptribe(tribe, conf); |           await apxtri.setuptribe(tribe, conf); | ||||||
|         } |         } | ||||||
| @@ -223,7 +223,7 @@ apxtri.runexpress = async (tribesdns, conf) => { | |||||||
|       if (!doms.includes(dm)) doms.push(dm); |       if (!doms.includes(dm)) doms.push(dm); | ||||||
|       //reindex database attention check dev-ants/.. a bug was fixed |       //reindex database attention check dev-ants/.. a bug was fixed | ||||||
|       glob.sync(`../${t}/objects/*`).forEach((o) => { |       glob.sync(`../${t}/objects/*`).forEach((o) => { | ||||||
|         console.log("reindex: ", o); |         //console.log("reindex: ", o); | ||||||
|         Odmdb.runidx(o); |         Odmdb.runidx(o); | ||||||
|       }); |       }); | ||||||
|     }); |     }); | ||||||
| @@ -324,21 +324,26 @@ apxtri.runexpress = async (tribesdns, conf) => { | |||||||
|   const ips = await apxtri.getip(); |   const ips = await apxtri.getip(); | ||||||
|   app.listen(conf.api.port, () => { |   app.listen(conf.api.port, () => { | ||||||
|     let webaccess = `/api/ waits request on port:${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) => { |     conf.dns.forEach((u) => { | ||||||
|       webaccess += `http://${u}/api/ `; |       //webaccess += `http://${u}/api/ `; | ||||||
|       localhosts+= `${ips.WAN} ${u} \n`; |       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(); | apxtri.main(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user