UNPKG

@windingtree/wt-write-api

Version:

API to write data to the Winding Tree platform

42 lines (40 loc) 1.32 kB
const winston = require('winston'); const knex = require('knex'); module.exports = { ethereumProvider: 'http://localhost:8545', entrypointAddress: '0xdummy', ethNetwork: 'local', swarm: { provider: 'http://localhost:8500', timeoutRead: 500, timeoutWrite: 1000, }, baseUrl: 'http://localhost:8000', db: knex({ client: 'sqlite3', connection: { filename: './.dev.sqlite', }, useNullAsDefault: true, }), allowedUploaders: ['s3', 'swarm', 'inMemory'], networkSetup: async (currentConfig) => { const { deployApp } = require('../utils/local-network'); const app = await deployApp(); currentConfig.entrypointAddress = app.entrypoint.address; currentConfig.logger.info(`Winding Tree hotel entrypoint deployed to ${app.entrypoint.address}`); currentConfig.logger.info(`Winding Tree hotel directory deployed to ${app.directory.address}`); currentConfig.logger.info(`Winding Tree hotel factory deployed to ${app.factory.address}`); const wt = require('../services/wt').get(); wt.entrypointAddress = currentConfig.entrypointAddress; }, logger: winston.createLogger({ level: 'debug', transports: [ new winston.transports.Console({ format: winston.format.simple(), stderrLevels: ['error'], }), ], }), };