Comments (11)
Currently avoiding anything that requires native dependencies or grows the dependency graph in a big way.
+1
I don't think we need to track that much. A plain object that's JSON.stringify()
able will work fine for most of our state. https://github.com/LinusU/node-application-config looks great to me.
from webtorrent-desktop.
I've generally been trying to put state that's ephemeral and can be thrown away on app exit into state.view
. Stuff that's outside that (i.e. state.*
) should be persisted to disk.
Right now, stuffs a bit disorganized there, but I think it's worth preserving a distinction here.
from webtorrent-desktop.
Maybe something like a state.session
object would make sense to namespace all things that are session specific?
from webtorrent-desktop.
(thinking eventually other things will be session specific outside of managing view state)
from webtorrent-desktop.
Could use node-application-config
to read/write from config to state.config
too
from webtorrent-desktop.
@ngoldman That sounds fine to me
from webtorrent-desktop.
Why not use node-application-config
to read/write the whole state object, minus state.session
?
from webtorrent-desktop.
Whichever's easier 😜
from webtorrent-desktop.
node-application-config looks jank. 2 stars on github, 43 downloads this week.
it also doesn't do file locking as far as i can tell, so there's nothing to prevent two instances of the app running and clobbering each other's state files
from webtorrent-desktop.
@dcposch GitHub stars and downloads per week don't mean anything if the package works :)
I think it looks like a good start anyway, specifically how it stores state in the right OS-specific location: https://github.com/LinusU/node-application-config-path/blob/master/index.js
Maybe we can add locking in a PR?
from webtorrent-desktop.
Totally agree, it's not about the stars and downloads. That said, https://www.npmjs.com/package/application-config is the right package (not https://www.npmjs.com/package/node-application-config), which got about 11,353 downloads last month :)
from webtorrent-desktop.
Related Issues (20)
- how set socks5 proxy,thanks HOT 1
- Change the storage location without modifying the running task HOT 1
- Download Module Crash HOT 5
- Option to bind to a specific network interface HOT 2
- while playing a torrent file app uses the intel hd gpu and the Nvidia gpu both at the same time HOT 1
- The software doesn't add torrents automatically. HOT 1
- Detection of false positive virus in WebTorrent Desktop download HOT 4
- I can download the movie but not the subtitle because the download forced to priorties the movie? HOT 1
- Ability to click on a magnet link (implementation of the magnet protocol) HOT 1
- Unable to read property of undefined... reading 'getBounds' on file build/main/windows/main.js line 87 HOT 3
- WebTorrent as Default - Not getting updated. HOT 1
- Working Snap Package ready HOT 7
- macOS Sonoma Crash HOT 1
- Add an option for specifying max number of concurrent seeding torrent HOT 1
- build for arm cpu for macos m1/m2, to who do not want to keep intel emulation HOT 3
- NordVPN is reporting that this app is vulnerable HOT 5
- Blank app presents on opening HOT 1
- Crashes when starting HOT 1
- I can't use Cast function
- Cast funcion doesnt work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtorrent-desktop.