heyio 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -132,17 +132,20 @@ export async function startApiServer() {
132
132
  sseConnections.delete(res);
133
133
  });
134
134
  });
135
- // Mount API at /api (for frontend) and / (backward compat)
135
+ // Mount API at /api (for frontend)
136
136
  app.use("/api", api);
137
- app.use("/", api);
138
- // Serve Vue frontend if built assets exist
137
+ // Serve Vue frontend if built assets exist (before backward-compat API mount)
139
138
  if (existsSync(WEB_DIST)) {
140
139
  app.use(express.static(WEB_DIST));
141
- // SPA fallback — serve index.html for any non-API route
140
+ console.log("[io] Web frontend enabled");
141
+ }
142
+ // Backward-compat: mount API at / (after static files so HTML/CSS/JS are served first)
143
+ app.use("/", api);
144
+ // SPA fallback — serve index.html for any unmatched route
145
+ if (existsSync(WEB_DIST)) {
142
146
  app.get("/{*splat}", (_req, res) => {
143
147
  res.sendFile(path.join(WEB_DIST, "index.html"));
144
148
  });
145
- console.log("[io] Web frontend enabled");
146
149
  }
147
150
  return new Promise((resolve) => {
148
151
  app.listen(config.port, () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "IO — a personal AI assistant built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"