Building Blockchain Projects by Narayan Prusty
Author:Narayan Prusty [Prusty, Narayan]
Language: eng
Format: epub, azw3, pdf
Publisher: Packt Publishing
Published: 2017-05-03T21:00:00+00:00
app.use(express.static("public"));
app.get("/", function(req, res){
res.sendFile(__dirname + "/public/html/index.html");
})
app.listen(8080);
The preceding code is self-explanatory.
Building the frontend
Now let's build the frontend of the app. The frontend will consists of the major functionalities, that is, generating seed, displaying addresses of a seed, and sending ether.
Now let's write the HTML code of the app. Place this code in the index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<br>
<div class="alert alert-info" id="info" role="alert">
Create or use your existing wallet.
</div>
<form>
<div class="form-group">
<label for="seed">Enter 12-word seed</label>
<input type="text" class="form-control" id="seed">
</div>
<button type="button" class="btn btn-primary" onclick="generate_addresses()">Generate Details</button>
<button type="button" class="btn btn-primary" onclick="generate_seed()">Generate New Seed</button>
</form>
<hr>
<h2 class="text-xs-center">Address, Keys and Balances of the seed</h2>
<ol id="list">
</ol>
<hr>
<h2 class="text-xs-center">Send ether</h2>
<form>
<div class="form-group">
<label for="address1">From address</label>
<input type="text" class="form-control" id="address1">
</div>
<div class="form-group">
<label for="address2">To address</label>
<input type="text" class="form-control" id="address2">
</div>
<div class="form-group">
<label for="ether">Ether</label>
<input type="text" class="form-control" id="ether">
</div>
<button type="button" class="btn btn-primary" onclick="send_ether()">Send Ether</button>
</form>
</div>
</div>
</div>
Download
Building Blockchain Projects by Narayan Prusty.azw3
Building Blockchain Projects by Narayan Prusty.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8304)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6763)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6739)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6623)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6408)
Driving Data Quality with Data Contracts by Andrew Jones(6349)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6112)
Learning SQL by Alan Beaulieu(5999)
Weapons of Math Destruction by Cathy O'Neil(5785)
Big Data Analysis with Python by Ivan Marin(5372)
Data Engineering with dbt by Roberto Zagni(4376)
Solidity Programming Essentials by Ritesh Modi(4025)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3886)
Pandas Cookbook by Theodore Petrou(3590)
Blockchain Basics by Daniel Drescher(3301)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2911)
Feature Store for Machine Learning by Jayanth Kumar M J(2816)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2799)
Mastering Python for Finance by Unknown(2745)
