| 
									
										
										
										
											2024-03-14 00:42:47 +00:00
										 |  |  | async function main() { | 
					
						
							| 
									
										
										
										
											2025-02-21 22:05:28 -05:00
										 |  |  | 	print(core.url); | 
					
						
							|  |  |  | 	let host = core.url.match(/.*?\/\/([^:/]*)/)[1]; | 
					
						
							|  |  |  | 	let port = await ssb.port(); | 
					
						
							| 
									
										
										
										
											2025-06-04 18:24:31 -04:00
										 |  |  | 	let id = (await ssb.getServerIdentity()).substring(1).split('.')[0]; | 
					
						
							|  |  |  | 	let room = `net:${host}:${port}~shs:${id}:SSB+Room+PSK3TLYC2T86EHQCUHBUHASCASE18JBV24=`; | 
					
						
							| 
									
										
										
										
											2024-03-14 00:42:47 +00:00
										 |  |  | 	await app.setDocument(`
 | 
					
						
							|  |  |  | 		<body style="color: #fff"> | 
					
						
							|  |  |  | 			<h1>Server</h1> | 
					
						
							|  |  |  | 			<div>The local server address is:</div> | 
					
						
							|  |  |  | 			<div><input type="text" readonly value="${room}" style="width: 100%"></input></div> | 
					
						
							|  |  |  | 		</body> | 
					
						
							|  |  |  | 	`);
 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2024-03-17 13:21:33 -04:00
										 |  |  | main(); |