From b759e9eed7c0f179f9258c06a8041cb66b4077d8 Mon Sep 17 00:00:00 2001 From: emizzle Date: Mon, 10 Sep 2018 16:36:30 +1000 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98defaultpath=E2=80=99=20for=20upl?= =?UTF-8?q?oad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hardcode to ‘index.html’ --- lib/modules/swarm/upload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modules/swarm/upload.js b/lib/modules/swarm/upload.js index 63532f60..0d312d89 100644 --- a/lib/modules/swarm/upload.js +++ b/lib/modules/swarm/upload.js @@ -16,14 +16,14 @@ class Swarm { async.waterfall([ function runCommand(callback) { console.log(("=== " + __("adding %s to swarm", self.buildDir)).green); - swarm.uploadDirectory(self.buildDir, callback); + swarm.uploadDirectory(self.buildDir, 'index.html', callback); }, function printUrls(dir_hash, callback) { if (!dir_hash) { return callback('No directory hash was returned'); } - console.log(("=== " + __("DApp available at") + ` ${self.providerUrl}/bzz:/${dir_hash}/`).green); - console.log(("=== " + __("DApp available at") + ` https://swarm-gateways.net/bzz:/${dir_hash}`).green); + console.log(("=== " + __("DApp available at") + ` ${self.providerUrl}/bzz:/${dir_hash}/index.html`).green); + console.log(("=== " + __("DApp available at") + ` https://swarm-gateways.net/bzz:/${dir_hash}/index.html`).green); console.log(("=== " + __("NOTE: A blockchain node must be running for the dApp to work correctly (ie 'embark run' or 'embark blockchain')").yellow)); callback(null, dir_hash);