Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Feature Request: Promise API #221

Closed
martinheidegger opened this issue Oct 30, 2018 · 3 comments
Closed

Feature Request: Promise API #221

martinheidegger opened this issue Oct 30, 2018 · 3 comments

Comments

@martinheidegger
Copy link
Contributor

Many other projects in the Node eco-system have changed to an optional Promise API, I would love to have it in DAT as well.

@RangerMauve
Copy link
Contributor

You might be interested in using node-dat-archive or @beaker/dat-node since they use the same promise-based APIs as Beaker.

This gives you the benefit of any code you write also working in Beaker.

Also, since I'm shameless, you could try targeting webrun which provides browser APIs (including the DatArchive API from beaker) and can be used in conjunction with node modules. This way you can write code that works in Beaker or the web first, and then sprinkle in any Node.js stuff you'd want.

@martinheidegger
Copy link
Contributor Author

I know that node-dat-archive and @beaker/dat-node exist, but I wonder why they are separate from dat-node. From a system-architecture perspective I can understand that you shouldn't pack too-much features into one project, but it seems to me that this super-thin approach seems to only discourage people to actually use DAT (particularly pointing out the missing promises). After all: Beaker didn't add those features for fun, but because they knew that a wider audience relies on promises to work.

@okdistribute
Copy link
Collaborator

Use dat-sdk for a promise API! It works!

This dat-node library doesn't have any full-time maintainers so I'd recommend keeping efforts here minimal, only for major improvements/features or critical bug and vulnerability fixes. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants