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

Updated webserver.js for Iroh integration #42

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
const chalk = require('chalk');

const app = express();

const { exec } = require('child_process');

// Start Iroh node
exec('iroh start', (error, stdout, stderr) => {
if (error) {

Check failure on line 17 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 2 spaces
console.error(`Error starting Iroh: ${error.message}`);

Check failure on line 18 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 4 spaces
return;

Check failure on line 19 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 4 spaces
}

Check failure on line 20 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 2 spaces
if (stderr) {

Check failure on line 21 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 2 spaces
console.error(`Iroh stderr: ${stderr}`);

Check failure on line 22 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 4 spaces
return;

Check failure on line 23 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 4 spaces
}

Check failure on line 24 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 2 spaces
console.log(`Iroh stdout: ${stdout}`);

Check failure on line 25 in src/webserver.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 2 spaces
});

app.renderAsync = util.promisify((tpl, data, callback) => app.render(tpl, data, callback));
let server;
const winston = require('winston');
Expand Down
Loading