hash4me

module
v0.0.0-...-7d2c65e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: MIT

README

hash4me

rpcx demo: 调用hashpower微服务,计算难度在10以内的hash

运行演示程序

一、 启动hashpower微服务

下载hashpower,执行 go run .运行这个微服务。

这个微服务模拟比特币的挖矿算法,给定一个指定的难度,它能够挖出一个哈希值。

默认它监听8972端口。

二、 启动web服务

在本项目主文件夹中执行go run backend/server.go, 它会启动一个web程序,接收用户的挖矿难度,调用hashpower微服务计算哈希值,并显示结果。

默认监听端口9981, 你可以访问 http://localhost:9981/ 测试。

重新编译web前端

进入frontend文件夹,执行:

yarn install
yarn build

生成的前端代码位于 frontend/dist, 本项目默认已经生成了前端。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL