Coder Social home page Coder Social logo

aelf-web-wallet's Introduction

AElf Web Wallet

0.Dependencies

  • Start up AElf Chain, aelf-block-scan, aelf-block-api at first

  • important call the API[POST:api/nodes/info] of aelf-block-api to insert the AElf Node information.

  • NodeJS: You can see the JS dependencies in pakage.json, we use egg.js(Node.js & Koa).

  • Correct config.

  • optional Nginx (or others) // SSL for Secure, Proxy for cross-origin.

1.Change config

config/config.default.js

config/config.node.js
# set you own apiServerProvider // api from aelf-block-api
# set your own default mainTokenName & mainTokenContract

database/config.json
# set your sql config for sequelize

2.Install Webpack & compile front files

npm install -g webpack
npm install -g webpack-cli

npm run build
# npm run build:dev
# npm run build:dev:w

3.Operate mysql by sequelize

npm run create-db
# npm run create-db:dev
npm run migrate
# npm run migrate:dev
# npm run undo-all
# npm run undo-all:dev

3.Start the node server

npm install
# If meet permisson problem.
# sudo npm install --unsafe-perm=true --allow-root

# dev
npm run dev
# pro
npm start

default port: 7001

Nginx(For Your Information)

How to open gizp.

How to config https.(We do not config https server in nodejs.)

How to proxy in nginx instead of proxy in nodejs.

  • nginx.conf

    • see how to open gizp
  • servsers/wallet.online.conf & servsers/wallet.conf

    • set your own RPC URL.
    • set your own server_name.
    • when use online(https)set your own ssl_certificate and ssl_certificate_key.

And please use plugin.nginx.js & demo.config.default.nginx.js instead of plugin.js & demo.config.defalut.js

FAQ

permission denied, open '/home/zhengyue/github/aelf-web-wallet/.travis.yml'

no such file or directory, scandir '/opt/aelf/app/aelf-web-wallet/node_modules/node-sass/vendor'

eggjs/egg#2442 (comment)

sudo npm install --unsafe-perm=true --allow-root
# Then
bash build.sh pro # or npm start

How to deal with int64

Use Long.js

https://www.npmjs.com/package/long

Docker[TODO]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.