Skip to content

Commit

Permalink
version up
Browse files Browse the repository at this point in the history
- 외부 Fabric에 붙여 테스트 해 보기 위해 업데이트 진행
- 유동적으로 option값을 바꿀 수 있도록 수정
- 코드 정리
- readme update
  • Loading branch information
chosung-dev committed Mar 19, 2021
1 parent 5dd38ee commit 4c5e9e9
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 492 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
fabricClient/wallet/*
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ git clone https://github.com/chosung-dev/fabric_board
```


#### 02.컨테이너 생성 및 서버 오픈
#### 02-1.컨테이너 생성 및 Fabric 실행

기존 fabric 환경 없이 docker를 활용해 간단하게 테스트 하려면 다음을 따라간다.

기존 fabric 환경이 있을경우 02-2번 항목으로 이동한다.

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

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

#### 02-2.기존 Fabric 환경에 연결

기존 Fabric 환경에 fabric board를 연결할 경우.

`basic-network/connection.json`파일을 환경에 맞게 수정한다.

지원하는 fabric 환경은 다음과 같다

```
fabric 1.4
1 channel
1 ca
n peer
n orderer
```


#### 03.Fabric board 실행

npm install 진행

```
Expand Down
18 changes: 10 additions & 8 deletions bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ const path = require('path');
app.set('port', process.env.PORT || 3000);

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

var ccControl = require(path.join(__dirname,'../ccControl/index.js'))();

ccControl.init_user1(function(value){
if(value == "Sucess"){
debug('Express server listening on port ' + server.address().port);
console.log("server up_ http://localhost:3000");
}
});
fabricManager.enrollAdmin(function(){
fabricManager.registerUser(function(){
fabricManager.connectContract(function(){
debug('Express server listening on port ' + server.address().port);
console.log("server up_ http://localhost:3000");
})
})
})
});
53 changes: 0 additions & 53 deletions ccControl/enrollAdmin.js

This file was deleted.

50 changes: 0 additions & 50 deletions ccControl/index.js

This file was deleted.

64 changes: 0 additions & 64 deletions ccControl/parts/create_board.js

This file was deleted.

64 changes: 0 additions & 64 deletions ccControl/parts/delete_board.js

This file was deleted.

57 changes: 0 additions & 57 deletions ccControl/parts/get_boardHistory.js

This file was deleted.

Loading

0 comments on commit 4c5e9e9

Please sign in to comment.