gamerate / tolstoy

Golos Blockchain Social Web Application

Home Page:https://golos.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stories in Ready

Golos.io

Golos.io это веб-клиент блокчейна golos.

Установка

Установка зависимостей

Установка node.js

Варианты расписаны тут

Установка последней версии node.js

# Ставим n - менеджер версий ноды
sudo npm install -g n
# Ставим последнюю версию ноды
sudo n latest

Установка зависимостей проекта

npm install

Редактирование файла конфигурации

cd config
cp steem-example.json steem-dev.json

Generate a new crypto_key and save under server_session_secret in ./steem-dev.json.

node
> crypto.randomBytes(32).toString('base64')

(note: it's steem.json in production)

Afterwards create front-end public config file

cd app/config
cp public-example.json public.json

Установка базы данных (mysql)

на проекте используется (sequelize)[http://docs.sequelizejs.com], поэтому можно использовать например postgres вместо mysql, подправив настройки

Настройки базы данных дублируются: db/config/config.json - используется для создания и синхронизации таблиц; config/steem.json/config/steem-dev.json - используется вебклиентом для работы с базой

OS X:
brew update
brew doctor
brew upgrade
brew install mysql
mysql.server restart
Debian:
sudo apt-get update
sudo apt-get install mysql-server

 Подключаемся к mysql и создаём базу данных steemit_dev:

mysql -u root
> create database steemit_dev;

Ставим sequelize-cli для всех пользователей:

npm install -g sequelize-cli pm2 mysql

Чтоы создать таблицы (а позже запустить миграцию) - запускаем sequelize db:migrate из папки db/.

Разработка

Запуск клиента в режиме разработки -

npm start

В этом режиме вебклиент берёт настройки из файла config/steem-dev.json

Style Guides

File naming and location
  • Prefer CamelCase js and jsx file names
  • Prefer lower case one word directory names
  • Keep stylesheet files close to components
  • Component's stylesheet file name should match component name
Js & Jsx

We are using Airbnb JavaScript Style Guide with some modifications (see .eslintrc). Please run eslint in the working directory before committing your changes and make sure you didn't introduce any new styling issues.

CSS & SCSS

If component requires a css rule, please use its uppercase name for the class, e.g. "Header" class for the header's root div. We adhere to BEM methodology with exception for Foundation classes, here is an example for the Header component:

<!-- Block -->
<ul class="Header">
  ...
  <!-- Element -->
  <li class="Header__menu-item">Menu Item 1</li>
  <!-- Element with modifier -->
  <li class="Header__menu-item--selected">Element with modifier</li>
</ul>

Production

If you want to test it locally in production mode, just run the following commands:

npm run build
npm run prod

or via pm2:

npm run build
npm -i -g pm2 # one time
pm2 start config/process.json

Команда npm run build запускает сборку и минификацию проекта. Команда npm run prod стартует собранный проект. В этом режиме вебклиент берёт настройки из файла config/steem.json

Также, есть скрипт build_n_run_webclient.sh, который устанавливает зависимости npm, запускает сборку, и стартует собранный проект в терминале screen.

Issues

To report a non-critical issue, please file an issue on this GitHub project.

If you find a security issue please report details to: secure[at]steemit[dot]com

We will evaluate the risk and make a patch available before filing the issue.

About

Golos Blockchain Social Web Application

https://golos.io

License:MIT License


Languages

Language:JavaScript 95.2%Language:CSS 4.5%Language:HTML 0.2%Language:Shell 0.1%