forked from Semiott/MesoNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
26 lines (21 loc) · 1.05 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const { Application, genesisBlockDevnet, configDevnet } = require ('lisk-sdk');
const NewsRepotingTransaction = require('./transactions/newsRepotingTransaction');
const NewsEditingTransaction = require('./transactions/newsEditingTransaction');
const NewsPublishingTransaction = require('./transactions/newsPublishingTransaction');
configDevnet.app.label = 'media-miner-ledger';
configDevnet.components.storage.port = 5435;
configDevnet.components.storage.password = 'lisk';
configDevnet.components.storage.database = 'lisk_dev';
configDevnet.components.storage.host = 'localhost';
configDevnet.modules.http_api.access.public = true;
configDevnet.app.genesisConfig.BLOCK_TIME = 10;
const app = new Application(genesisBlockDevnet, configDevnet);
app.registerTransaction(NewsRepotingTransaction);
app.registerTransaction(NewsEditingTransaction);
app.registerTransaction(NewsPublishingTransaction);
app.run()
.then(() => app.logger.info('App started...') )
.catch(error => {
console.error('Faced error in application', error);
process.exit(1);
});