gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 02/03: description


From: gnunet
Subject: [taler-wallet-core] 02/03: description
Date: Sat, 09 Nov 2024 21:03:48 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

commit 6b313c6ca1f599f1aa681206700b43463f47b830
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Sat Nov 9 16:57:24 2024 -0300

    description
---
 packages/web-util/src/serve.ts | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/packages/web-util/src/serve.ts b/packages/web-util/src/serve.ts
index 1daea15bf..ff985bbfe 100644
--- a/packages/web-util/src/serve.ts
+++ b/packages/web-util/src/serve.ts
@@ -22,6 +22,7 @@ const logger = new Logger("serve.ts");
 const PATHS = {
   WS: "/ws",
   EXAMPLE: "/examples",
+  ROOT: "/",
   APP: "/app",
 };
 
@@ -46,7 +47,7 @@ export async function serve(opts: {
   if (opts.tls) {
     httpsServer = https.createServer(httpServerOptions, app);
     httpsPort = opts.port + 1;
-    servers.push(httpsServer)
+    servers.push(httpsServer);
   }
 
   logger.info(`Dev server. Endpoints:`);
@@ -124,6 +125,27 @@ export async function serve(opts: {
     );
   });
 
+  app.get(PATHS.ROOT, function (req: any, res: any) {
+    res.set("Content-Type", "text/html");
+    res.send(`<hmtl>
+      <head><title>Development Server</title></head>
+      <body>
+      it will connect to this server using websocket and reload automatically 
when the code changes
+      <h1>Endpoints</h1>
+      <dl>
+        <dt><a href="./app">app</a></dt>
+        <dd>Where you can find the application. Reloads on update.</dd>
+
+        <dt><a href="./examples">ui examples</a></dt>
+        <dd>Where you can browse static UI examples. Reloads on update.</dd>
+
+        <dt><a href="./ws">websocket</a></dt>
+        <dd>Announce when the code changes</dd>
+      </dl>
+      </body>
+      </html>`);
+  });
+
   logger.info(`Serving ${opts.folder} on ${httpPort}: plain HTTP`);
   httpServer.listen(httpPort);
   if (httpsServer !== undefined) {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]