1023198294 / BCtrade

A blockchain-based(hyperledger) web application built by vue+springboot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BCtrade

A blockchain-based(hyperledger) web application built by vue+springboot

Quick Start

prerequisite

nodejs

webpack-dev-server

node_modules

maven

web application

locate to the directory, download the dependencies and use npm run command

$ cd front
$ sudo npm install #be patient, It's going to take a while
$ # if permissions denied in mkdir, try the following command
$ # npm install --unsafe-perm
$ sudo npm run dev

backend

$ cd backend
$ mvn package -DskipTests
$ if maven version is not greater than 3.2.0, please follow the guides in https://blog.csdn.net/qq_38974638/article/details/112784951
$ mvn test -Dtest=AddAccountTest#enrollAdminTest
$ java -jar target/demo-0.0.1-SNAPSHOT.jar
$ #if the system shows no main manifest run the following command
$ # java -cp target/demo-0.0.1-SNAPSHOT.jar com.example.demo.DemoApplication
$ # 

api

#注册服务,注册的用户信息放在body, 示例如下
register:
http://localhost:8999/admin/register
body:
{
  "id":"114514",
  "username":"luojun",
  "password":"1919810",
  "available":"true",
  "role":"user",
  "regtime":" "
}

#登录服务
login:
	http://localhost:8999/admin/login?username=bt&password=bt
	username和password是请求的参数
	
#退出登录	
logout:
	http://localhost:8999/admin/logout	

#权限测试:权限为user的用户请求该api会接收hello报文
hello:
	http://localhost:8999/admin/hello
	
#权限测试:权限为admin的用户请求该api会接收hello报文
ahello:
	http://localhost:8999/admin/ahello

About

A blockchain-based(hyperledger) web application built by vue+springboot


Languages

Language:JavaScript 31.9%Language:Java 25.9%Language:Go 24.1%Language:Shell 9.8%Language:Vue 5.0%Language:TypeScript 3.1%Language:SCSS 0.1%Language:Dockerfile 0.0%Language:HTML 0.0%