From 6ecf55d7a275cd420ca6bb0d67005e0d68b7a006 Mon Sep 17 00:00:00 2001 From: "raja.blaze" Date: Fri, 9 Aug 2019 11:35:01 +0530 Subject: [PATCH 1/3] append issue fixed --- src/app/view/home/latestblocks/latestblocks.component.html | 1 + src/app/view/home/latestblocks/latestblocks.component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/view/home/latestblocks/latestblocks.component.html b/src/app/view/home/latestblocks/latestblocks.component.html index f78a86b..f53b7fc 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.html +++ b/src/app/view/home/latestblocks/latestblocks.component.html @@ -46,6 +46,7 @@
+
diff --git a/src/app/view/home/latestblocks/latestblocks.component.ts b/src/app/view/home/latestblocks/latestblocks.component.ts index 4724e40..92b41ac 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.ts +++ b/src/app/view/home/latestblocks/latestblocks.component.ts @@ -75,7 +75,7 @@ export class LatestblocksComponent implements OnInit { const blockFactory = this.resolver.resolveComponentFactory( BlockAppendComponent, ); - const block = this.block.createComponent(blockFactory); + const block = this.block.createComponent(blockFactory, 0); this.blockAppend = {}; this.blockAppend['blockchain_block_hash'] = this.blockdetails.hash; this.blockAppend[ From 72936500b4a4f3c5cddb7e4e1139bde47f716bba Mon Sep 17 00:00:00 2001 From: "raja.blaze" Date: Fri, 9 Aug 2019 11:40:58 +0530 Subject: [PATCH 2/3] append issue fixed --- src/app/view/home/latestblocks/latestblocks.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/view/home/latestblocks/latestblocks.component.ts b/src/app/view/home/latestblocks/latestblocks.component.ts index 92b41ac..8380742 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.ts +++ b/src/app/view/home/latestblocks/latestblocks.component.ts @@ -64,10 +64,11 @@ export class LatestblocksComponent implements OnInit { this.blockdetails = response; //console.log(this.blockdetails); if (this.lastblock != this.blockdetails.block_height) { - //console.log('Create'); + console.log('Create'); this.createBlock(); } this.lastblock = this.blockdetails.block_height; + console.log(this.lastblock); }); } From df17e59257d00dcc6874184872bac3e7413c5867 Mon Sep 17 00:00:00 2001 From: sabash-c Date: Fri, 9 Aug 2019 11:52:25 +0530 Subject: [PATCH 3/3] move file to live folder --- package.json | 5 +++-- server.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c8952ff..06ad8d8 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,15 @@ "start": "ng serve", "build": "ng build", "lint": "ng lint", + "copyToLive":"rm -rf live && cp -rf dist live", "build:client-and-server-bundles": "ng build --prod && ng run explorer2-epic:server:production", "build:prerender": "npm run build:client-and-server-bundles && npm run compile:server && npm run generate:prerender", - "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server && npm run move:build", + "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server && npm run move:build && npm run copyToLive", "compile:server": "tsc -p server.tsconfig.json", "move:build": "(cp -r ./server/i18n/ dist/server)", "generate:prerender": "cd dist && node prerender", "serve:prerender": "cd dist/browser && http-server", - "serve:ssr": "node dist/server" + "serve:ssr": "node live/server" }, "private": true, "dependencies": { diff --git a/server.ts b/server.ts index dd919c9..0c9d14e 100644 --- a/server.ts +++ b/server.ts @@ -63,7 +63,7 @@ enableProdMode(); const app = express(); const PORT = process.env.PORT || 4000; -const DIST_FOLDER = join(process.cwd(), "dist"); +const DIST_FOLDER = join(process.cwd(), "live"); const controllers = [ new BlockchainBlockController(),