Skip to content

support for multiple apps#8

Open
aaronshaf wants to merge 2 commits intomasterfrom
multipleapps3
Open

support for multiple apps#8
aaronshaf wants to merge 2 commits intomasterfrom
multipleapps3

Conversation

@aaronshaf
Copy link
Copy Markdown
Collaborator

@aaronshaf aaronshaf commented Jul 16, 2018

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

Comment thread applications.js Outdated
})

// if I load prematurely, it doesn't work
sleep(3000).then(loadAllArchives)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

Worth another look

@aaronshaf
Copy link
Copy Markdown
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.

Comment thread applications.js
const { join, basename } = require('path')
const mkdirp = require('mkdirp')

const APPLICATIONS_DIR = join(__dirname, 'applications')
Copy link
Copy Markdown
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