Browse Source

Svelte: Introduce support for the alpine route

Alessandro Pignotti 9 months ago
parent
commit
60b8f103b6
3 changed files with 26 additions and 0 deletions
  1. 19 0
      config_public_alpine.js
  2. 1 0
      nginx.conf
  3. 6 0
      src/routes/alpine/+page.svelte

+ 19 - 0
config_public_alpine.js

@@ -0,0 +1,19 @@
+// The root filesystem location
+export const diskImageUrl = "wss://disks.webvm.io/alpine_20240307_i3_slimmed.ext2";
+// The root filesystem backend type
+export const diskImageType = "cloud";
+// Print an introduction message about the technology
+export const printIntro = false;
+// Is a graphical display needed
+export const needsDisplay = true;
+// Executable full path (Required)
+export const cmd = "/sbin/init";
+// Arguments, as an array (Required)
+export const args = [];
+// Optional extra parameters
+export const opts = {
+	// User id
+	uid: 0,
+	// Group id
+	gid: 0
+};

+ 1 - 0
nginx.conf

@@ -38,6 +38,7 @@ http {
             add_header 'Cross-Origin-Opener-Policy' 'same-origin' always;
             add_header 'Cross-Origin-Embedder-Policy' 'require-corp' always;
             add_header 'Cross-Origin-Resource-Policy' 'cross-origin' always;
+            try_files $uri /index.html;
         }
     }
 }

+ 6 - 0
src/routes/alpine/+page.svelte

@@ -0,0 +1,6 @@
+<script>
+import WebVM from '$lib/WebVM.svelte';
+import * as configObj from '/config_public_alpine'
+</script>
+
+<WebVM configObj={configObj} />