Skip to content
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

support for multiple apps #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

support for multiple apps #8

wants to merge 2 commits into from

Conversation

aaronshaf
Copy link
Collaborator

@aaronshaf aaronshaf commented Jul 16, 2018

  • .dat-pub/{application key}.json
  • rename endpoint -> /applications/{dat-key}/archives
  • resolve dat urls

applications.js Outdated
})

// if I load prematurely, it doesn't work
sleep(3000).then(loadAllArchives)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an await here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, dat location can be immediately returned, even before the hub begins to successfully host it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Cool, that makes sense.

utils.js Outdated
file = await userArchive.readFile(proofLocation)
} catch (err) {
throw new Error(
`Proof file missing: /.well-known/dat-pubs/${applicationPub.url.slice(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should replace this with Proof file missing: ${proofLocation} to make it easier to change the location in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- Add more schemas
- Add forms for testing API
- Resolve Dat URLs
- Use more Bootstrap on the front
@aaronshaf
Copy link
Collaborator Author

Worth another look

@aaronshaf
Copy link
Collaborator Author

aaronshaf commented Jul 28, 2018

Looks like I should use dat-node before merging this. beakerbrowser/dat-node#2 (comment)


Nevermind. I'll do that in a future version.

const { join, basename } = require('path')
const mkdirp = require('mkdirp')

const APPLICATIONS_DIR = join(__dirname, 'applications')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be configurable by the user.

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

Successfully merging this pull request may close these issues.

2 participants