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

Issue 9 standalone aietes #23

Merged
merged 9 commits into from
Jul 25, 2019
Merged

Issue 9 standalone aietes #23

merged 9 commits into from
Jul 25, 2019

Conversation

spik3r
Copy link
Collaborator

@spik3r spik3r commented May 20, 2019

Probably not yet final, but would be nice to get some feedback thoughts on how we want to implement the standalone Aietes server and what configuration options we see are "Must Have" in the initial version.

@spik3r spik3r requested review from dtobe, a user and TurgutGenc May 20, 2019 13:50
@dtobe dtobe added this to In progress in Aietes-JS May 23, 2019
Copy link
Owner

@dtobe dtobe left a comment

Choose a reason for hiding this comment

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

Just some minor things maybe worth discussing.

README.md Outdated Show resolved Hide resolved
standalone/index.js Outdated Show resolved Hide resolved
standalone/index.js Outdated Show resolved Hide resolved
standalone/index.js Outdated Show resolved Hide resolved
@dtobe dtobe self-assigned this Jul 15, 2019
simplified standalone interface by removing some parameters
adapted README
const responseFileName = argv.json;
let jsonResponse;
if (responseFileName) {
jsonResponse = JSON.parse(await fs.readFile(responseFileName, 'utf8'));
Copy link

Choose a reason for hiding this comment

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

Should we implement something if JSON.parse throws an error because the Json inside the file is not valid?

Copy link
Owner

Choose a reason for hiding this comment

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

That does sound like a good idea. Though I think the only thing we can do is output a (hopefully) helpful error and exit gracefully.

Copy link

Choose a reason for hiding this comment

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

Here or next PR?

Copy link
Owner

@dtobe dtobe Jul 23, 2019

Choose a reason for hiding this comment

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

Come to think of it: what do you mean? Just catch the error that readFile may throw or validate the structure of the JSON read in before passing it to Aietes?
We could do both, like e.g. using this https://www.npmjs.com/package/jsonschema

Copy link
Owner

@dtobe dtobe Jul 23, 2019

Choose a reason for hiding this comment

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

I'd suggest doing the validation in a separate PR though.

Copy link

Choose a reason for hiding this comment

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

Deal.

@ghost ghost self-requested a review July 25, 2019 08:45
@dtobe dtobe moved this from In progress to In Review in Aietes-JS Jul 25, 2019
Copy link
Owner

@dtobe dtobe left a comment

Choose a reason for hiding this comment

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

Implemented requested changes.

@dtobe dtobe merged commit 6ec23fe into master Jul 25, 2019
@dtobe dtobe deleted the issue-9-standalone branch July 25, 2019 10:06
@dtobe dtobe moved this from In Review to Done in Aietes-JS Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Aietes-JS
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants