Skip to content

bitclave/base-node

Repository files navigation

BASE-NODE

BASE-NODE is the implementation of the Node component in BASE platform.

Build Status Coverage Status License: GPL v3

Lint:

  • If you use IntelliJ IDEA, you can call gradlew installKtlintIdeaProject for configure code-style.

  • Also you can load config file for codestyle from root dir 'kotlin-codestyle.xml'

  • Use for Intellij IDEA (Cherished keys for text formatting):

  • ctrl + alt + O is Optimize imports

  • ctrl + alt + L is Reformat code

  • For Mac Os see:

  • Default key map

  • For auto-formatting call gradlew ktlintFormat

Notes

  • BASE-NODE API is available here

Installation

sudo -u postgres psql postgres
\password postgres
bitclave
\q
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
  • install local blockchain:
sudo npm install -g ganache-cli
  • start your local blockchain
./start-ganache.sh 
  • start your local Postgres instance (Mac)
postgres -D .
  • verify your Postgres instance is running (using pgAdmin for example)

  • set base-node configuration to local

in file src/main/resources/application-local.yml, set ( spring.profiles.active=local)
or
set enviroment variable PROFILE=local

How to Run

  • build project:
gradlew build
  • start local blockchain:
./start-ganache
  • run tests
gradlew test
  • compile and start spring-boot app:
gradlew bootRun
  • check the base-node API
http://localhost:8080/swagger-ui.html