-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] hosting the sync-server with the desktop app (POC) #3631
base: master
Are you sure you want to change the base?
[WIP] hosting the sync-server with the desktop app (POC) #3631
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
This seems very cool! |
@@ -37,6 +37,7 @@ fi | |||
yarn workspace loot-core build:node | |||
|
|||
yarn workspace @actual-app/web build --mode=desktop | |||
yarn workspace @actual-app/crdt build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crdt is a dependency of actual-server. Build it before packaging the sync-server
} | ||
|
||
res.setHeader('Content-Disposition', `attachment;filename=${fileId}`); | ||
res.sendFile(getPathForUserFile(fileId)); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
// Source: https://expressjs.com/en/guide/error-handling.html | ||
return next(err); | ||
} | ||
console.log(`Error on endpoint ${req.url}`, err.message, err.stack); |
Check failure
Code scanning / CodeQL
Use of externally-controlled format string High
user-provided value
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
…lectron/server-hosting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Regarding #3128 and:
Fix server status appearing as offline when it finishes starting after web client loads
Do you think we could pull just those changes out into a separate PR so that fix can be merged and applied?
Otherwise, if you could point me to which part of this PR addresses the problem, I can create a PR myself with just that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, It's not actually fixed, I just avoided it. It no longer happens on this build because I connect directly to localhost instead of through ngrok - the underlying issue is still there.
NOTE: this branch has been around too long - check for merge fallout.
The goal
Free server hosting via the desktop app. We'd run the sync server inside of the desktop app, expose it to the internet via ngrok (or similar) and provide a QR code/url for the user to connect their phone to the server.
We could provide an option to start actual-server when the computer starts up. If we did this the server would be alive whenever the computer is on. If the user downloads the pwa to their phone they could budget even when the server is offline - it would sync when the computer is turned back on.
Todos:
In a follow up feature:
Known issues
Next: Figure out the best way to bring actual-server into the actual repo
Expose the running server to the internet
Manged to get it working with ngrok. Ngrok's big and they give you a free domain. It works a treat. I haven't tested it in anger, I'm sure it will disconnect me after an hour or so so we may need to add logic to reconnect.
Thoughts on bundling the actual-server code
Old thoughts:
Server sync notes