Skip to content

Commit 4c5e9e9

Browse files
committed
version up
- 외부 Fabric에 붙여 테스트 해 보기 위해 업데이트 진행 - 유동적으로 option값을 바꿀 수 있도록 수정 - 코드 정리 - readme update
1 parent 5dd38ee commit 4c5e9e9

15 files changed

+211
-492
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
fabricClient/wallet/*

README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ git clone https://github.com/chosung-dev/fabric_board
99
```
1010

1111

12-
#### 02.컨테이너 생성 및 서버 오픈
12+
#### 02-1.컨테이너 생성 및 Fabric 실행
13+
14+
기존 fabric 환경 없이 docker를 활용해 간단하게 테스트 하려면 다음을 따라간다.
15+
16+
기존 fabric 환경이 있을경우 02-2번 항목으로 이동한다.
1317

1418
startFabric.sh를 통해 컨테이너 생성 및 체인코드 입력.
1519

@@ -29,6 +33,25 @@ d0f67b94d03c hyperledger/fabric-orderer
2933
e7c51dbbff39 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 minutes ago Up 2 minutes 0.0.0.0:7054->7054/tcp
3034
```
3135

36+
#### 02-2.기존 Fabric 환경에 연결
37+
38+
기존 Fabric 환경에 fabric board를 연결할 경우.
39+
40+
`basic-network/connection.json`파일을 환경에 맞게 수정한다.
41+
42+
지원하는 fabric 환경은 다음과 같다
43+
44+
```
45+
fabric 1.4
46+
1 channel
47+
1 ca
48+
n peer
49+
n orderer
50+
```
51+
52+
53+
#### 03.Fabric board 실행
54+
3255
npm install 진행
3356

3457
```

bin/www

+10-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ const path = require('path');
66
app.set('port', process.env.PORT || 3000);
77

88
var server = app.listen(app.get('port'), function() {
9+
var fabricManager = require(path.join(__dirname,'../fabricClient/fabricManager.js'));
10+
var async = require('async')
911

10-
var ccControl = require(path.join(__dirname,'../ccControl/index.js'))();
11-
12-
ccControl.init_user1(function(value){
13-
if(value == "Sucess"){
14-
debug('Express server listening on port ' + server.address().port);
15-
console.log("server up_ http://localhost:3000");
16-
}
17-
});
12+
fabricManager.enrollAdmin(function(){
13+
fabricManager.registerUser(function(){
14+
fabricManager.connectContract(function(){
15+
debug('Express server listening on port ' + server.address().port);
16+
console.log("server up_ http://localhost:3000");
17+
})
18+
})
19+
})
1820
});

ccControl/enrollAdmin.js

-53
This file was deleted.

ccControl/index.js

-50
This file was deleted.

ccControl/parts/create_board.js

-64
This file was deleted.

ccControl/parts/delete_board.js

-64
This file was deleted.

ccControl/parts/get_boardHistory.js

-57
This file was deleted.

0 commit comments

Comments
 (0)