BASE-NODE is the implementation of the Node component in BASE platform.
-
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:
-
For auto-formatting call
gradlew ktlintFormat
- BASE-NODE API is available here
- install PostgreSQL (https://www.postgresql.org/download)
- update password for user "postgres" to "bitclave"
sudo -u postgres psql postgres
\password postgres
bitclave
\q
-
install NodeJS, NPM
-
install pgadmin (https://www.pgadmin.org/)
-
install Java:
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
- 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