Position: Home page » Ethereum » Nodejs set up Ethereum

Nodejs set up Ethereum

Publish: 2021-04-17 02:01:55
1. Go is an open source programming language, which makes it easy to construct simple, reliable and efficient software. If you want to learn this programming language, you should first find a good tutorial. Brother Lian's go language + blockchain training has recently published a new set of go language tutorial, and the teacher's speaking is very good

with the global hot discussion of the concept of "blockchain", the application of blockchain technology has been quietly added to the daily life scenes such as finance, logistics, credit reference, manufacturing and retail. Some experts have shown that the future blockchain will be closely related to people's lives, and the integration of blockchain technology and people's daily life is the general trend

the popularity of the blockchain market has triggered a large number of talents demand based on blockchain technical personnel, and the popularity of blockchain talents is rising at the speed of light. According to the "2018 blockchain high salary list" released by lagou.com, Tencent, Xiaomi, Suning, Jingdong and other domestic enterprise giants have released many high salary blockchain post demands, trying to explore blockchain related technologies and applications. It is also pointed out in the list that the demand for high salary jobs is mainly based on blockchain related technical jobs, among which Suning and Keda have been given the highest monthly salary of 100k

the huge market demand for technical talents will inevitably lead to the explosive emergence and growth of the whole blockchain training market. Most of the training modes can be divided into online training, traditional IT organization training, and offline short-term training camps, which mainly focus on high-end forms. However, in the process of the hot market evolution, there are also a variety of blockchain training chaos: lecturers' qualifications are watered down, and even the most basic names are not disclosed, the syllabus is opaque, and the teaching quality is shrinking, Unreasonable class arrangement and uneven training fees and so on

with the large-scale development of the whole blockchain training market, brother company ecation, together with Yin Cheng, a senior blockchain expert, and his Tsinghua Shuimu Weiming team, has set up a blockchain college. With its professional and powerful team of technical lecturers, detailed and comprehensive curriculum system, and a large number of authentic enterprise blockchain projects, it aims to deepen the blockchain teaching and training field, And train more professional technical talents for enterprises and society<

Yin Cheng, a senior blockchain technology expert, graated from Tsinghua University, is the dean of brother Lian blockchain college. He once served as Google Algorithm Engineer, the world's most valuable expert in the field of Microsoft blockchain, and the gold medal lecturer of Microsoft tech.ed conference. Proficient in C / C + +, python, go language, sicikit learn and tensorflow. With 15 years of programming experience and 5 years of teaching experience, senior software architect, Intel Software Technology expert, famous technology expert, with many years of working experience in the world's top it company Microsoft Google. He has many years of experience in software programming and lecturing, and has developed many procts in human-computer interaction, ecation, information security, advertising and blockchain system. He has deep experience in project management and R & D, has two AI invention patents, and has practical experience in developing e-money deployed to Microsoft Windows azure. Teaching explanation is in simple language, so that students can apply what they have learned
the first stage: blockchain instry and go programming for 5 weeks
the second stage: cryptography and consensus algorithm for 2 weeks
the third stage: Ethereum source code analysis and development for 3 weeks
the fourth stage: Super ledger and node.js for 2 weeks
the fifth stage: bitcoin & EOS for 4 weeks
the sixth stage: comprehensive actual combat of the project
2. Do you want to learn blockchain development technology or just want to know what blockchain is? If it is the former, you can look at the code of other blockchain projects and learn about it first. If it is the latter, we can pay attention to some good blockchain we media. Blockchain is an emerging instry. There is no ready-made training course. It depends on self exploration and understanding.
3. Go is an open source programming language, which makes it easy to construct simple, reliable and efficient software. If you want to learn this programming language, you should first find a good tutorial. Brother Lian's go language + blockchain training has recently published a new set of go language tutorial, and the teacher's speaking is very good

with the global hot discussion of the concept of "blockchain", the application of blockchain technology has been quietly added to the daily life scenes such as finance, logistics, credit reference, manufacturing and retail. Some experts have shown that the future blockchain will be closely related to people's lives, and the integration of blockchain technology and people's daily life is the general trend

the popularity of the blockchain market has triggered a large number of talents demand based on blockchain technical personnel, and the popularity of blockchain talents is rising at the speed of light. According to the "2018 blockchain high salary list" released by lagou.com, Tencent, Xiaomi, Suning, Jingdong and other domestic enterprise giants have released many high salary blockchain post demands, trying to explore blockchain related technologies and applications. It is also pointed out in the list that the demand for high salary jobs is mainly based on blockchain related technical jobs, among which Suning and Keda have been given the highest monthly salary of 100k

the huge market demand for technical talents will inevitably lead to the explosive emergence and growth of the whole blockchain training market. Most of the training modes can be divided into online training, traditional IT organization training, and offline short-term training camps, which mainly focus on high-end forms. However, in the process of the hot market evolution, there are also a variety of blockchain training chaos: lecturers' qualifications are watered down, and even the most basic names are not disclosed, the syllabus is opaque, and the teaching quality is shrinking, Unreasonable class arrangement and uneven training fees and so on

with the large-scale development of the whole blockchain training market, brother company ecation, together with Yin Cheng, a senior blockchain expert, and his Tsinghua Shuimu Weiming team, has set up a blockchain college. With its professional and powerful team of technical lecturers, detailed and comprehensive curriculum system, and a large number of authentic enterprise blockchain projects, it aims to deepen the blockchain teaching and training field, And train more professional technical talents for enterprises and society<

Yin Cheng, a senior blockchain technology expert, graated from Tsinghua University, is the dean of brother Lian blockchain college. He once served as Google Algorithm Engineer, the world's most valuable expert in the field of Microsoft blockchain, and the gold medal lecturer of Microsoft tech.ed conference. Proficient in C / C + +, python, go language, sicikit learn and tensorflow. With 15 years of programming experience and 5 years of teaching experience, senior software architect, Intel Software Technology expert, famous technology expert, with many years of working experience in the world's top it company Microsoft Google. He has many years of experience in software programming and lecturing, and has developed many procts in human-computer interaction, ecation, information security, advertising and blockchain system. He has deep experience in project management and R & D, has two AI invention patents, and has practical experience in developing e-money deployed to Microsoft Windows azure. Teaching explanation is in simple language, so that students can apply what they have learned
the first stage: blockchain instry and go programming for 5 weeks
the second stage: cryptography and consensus algorithm for 2 weeks
the third stage: Ethereum source code analysis and development for 3 weeks
the fourth stage: Super ledger and node.js for 2 weeks
the fifth stage: bitcoin & EOS for 4 weeks
the sixth stage: comprehensive actual combat of the project
4. Using Kushen cold wallet, the private key does not touch the net to ensure the security of assets
5. The Internet has just begun, intelligent life coming
6. Truffle is a world-class development environment, testing framework, Ethereum resource management channel, dedicated to making Ethereum development easier, truffle has the following:
built in smart contract compilation, linking, deployment and binary file management
automatic contract testing under rapid development
scripted and extensible deployment and publishing framework
the network environment management function deployed to no matter how many public or private networks
uses the package management provided by ethpm & NPM and erc190 standard
a direct interactive console that communicates directly with the contract (after writing the contract, you can verify it on the command line)
the configurable construction process supports tight integration
external scripts can be executed in truffle environment< Truffle is the most popular development framework, whose mission is to make development easier
installation method:
$NPM install - G truffle
environment requirements
nodejs 5.0 +
windows, Linux, or Mac OS X
truffle needs Ethereum client and supports standard JSON RPC API. For development, some are more suitable, which will be introced in the following chapters (for example, testrpc provides real-time feedback ring coding and debugging)
suggestions for Windows users
if you are a Windows user, we recommend that you use PowerShell or git bash to install and use the truffle framework. These two shell environments provide more convenient features than the default
if you have to use the command line, see the discussion here on how to configure truffle.
7. 1. Install nodejs

1. Compile environment
source code compiler, usually UNIX / Linux platform comes with C + + compiler (GCC / G + +). If not, please install make, G + + through the package installation tool of the current release
the tool under Debian / Ubuntu is apt get
RedHat / CentOS. You may need to install Xcode to get the compiler under Mac OS X

2. Network encryption
secondly, if you plan to enable network encryption in node.js, OpenSSL encryption library is also necessary. The encryption library is libssl dev, which can be installed through apt get install libssl Dev and other commands

3. Manual compilation
WGet http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
tar zxvf node-v0.6.1. Tar. GZ
CD node-v0.10.26
. / configure
the above commands download the latest version of the code through WGet command and extract it/ The configure command will check whether the environment meets the compilation requirements of nodejs
make
make install

2. Install NPM

1. The full name of NPM is node package manager, which is the third-party installation Library of nodejs< br />curl http://npmjs.org/install.sh | sh
curl http://npmjs.org/install.sh The installation shell script is obtained through curl command, and then the obtained script is executed by SH command through pipe character |

2. Change the third-party library
NPM install underscore
2 [email protected] ./node_ Moles / underscore
e to some special network environment, when installing a third-party library directly through the NPM install command, it often gets stuck. Fortunately, @ fire9 students from CNode community in China built a mirror NPM resource library in their spare time. The server is set up in Japan, which can bypass some unnecessary network problems. You can install the third-party library with the following command:
NPM -- registry & quot; http://npm.hacknodejs.com/

if you want to set it as the default repository, run the following command:
NPM config set registry & quot; http://npm.hacknodejs.com/ "

install the package through NPM. After installation, it will be automatically installed in the / usr / local / bin directory, and the dependent function library will also be automatically installed in the / usr / local / lib / node directory, which is very convenient

3. Install nodejs debugging environment

1. Install node inspector component in global mode with NPM command
sudo NPM install - G node inspector

2. Change port
Modify port of node Inspector / lib / config.js
'Web port': {
desc: 'port to host the inspector',
Convert: conversions.stringtoint,
defaultValue: 6868
},

3. Use
node inspector to start a debugging tool
to enter the http://127.0.0.1 : 6868 / debug? Port = 5858 open the debug mode of chrome

debug nodejs project with node debug
node -- debug BRK = 5858 read. JS

you can view the debug information in chrome

4. Build nodejs with sublime

settings Set builder of sublime - & gt& gt;< br />Tools ->& gt; Build System ->& gt; New build system
write the following code to
{
"CMD": [& quot/ usr/local/bin/node", “$ file”],
“file_ regex”: “^[ ]File "(…?)”, line ([0-9]*)",
"selector": "source. JavaScript"
}
save it as nodejs. Sublime build file
in this way, you can directly use COM + B to run the program with nodejs
8.

The specific operation steps of connecting two computers are as follows:

1. In the first step, connect the network cable to two computers, as shown in the figure below

9.

Imagine

  1. server-side file read-write operation, using JS to write the returned JSON file in the HTML file, that is, HTML returns JSON

  2. server-side erecting nginx, using routing to the server-side HTML file

  3. client, using & lt; script> Link to the server-side HTML file and return the dynamic JSON

  4. < / OL >
10. CentOS closes firewall:
systemctl stop firewalld.service # stop firewall
systemctl disable firewalld.service # disable firewall boot
firewall CMD -- state # view the default firewall state (not running after closing, running after opening)
next we will configure nodejs and mongodb
nodejs
first, log in to the CentOS server remotely with xshell on the client, and click the "new" button
the host address is required, and fill in the IP address of the remote server. Here, (192.168.56.130) is used (IP address of the virtual machine can be viewed by inputting ifconfig on the terminal of the virtual machine), By default, you can
enter the root and password (the root password you just set) in "user authentication" and click "OK"

after connecting to the remote server successfully, as shown in the figure

if not, open your virtual machine to see if your Ethernet is connected, and be sure to connect. Next, we will really enter our configuration process. Download the compressed package of node and mongodb and put it in a directory,

and then
1. On the local host, use git bash command
SCP node-v6.10.2-linux-x64.tar.xz (the node compressed file to be installed) [email protected] : / home / nodejs copies the file to the remote server
means to the local node-v6.10.2-linux-x64.tar.xz file to the / home / nodejs directory of 192.168.56.130, and then it will be displayed

2. First, use CD.. to enter the root directory of all the directories, Then use dir to view and find home, and use MKDIR to create the folder
/ home / nodejs directory. You need to use MKDIR command in xshell to create the directory
be sure to use dir to view the created files and uploaded compressed packages at any time
3. After ing successfully, use xshell to enter the / home / nodejs directory
first use dir to check whether there is this installation package,
4. Use the following two commands to install
XZ - D node-v6.10.2-linux-x64. Tar. XZ
tar - xvf node-v6.10.2-linux-x64. Tar. XZ
under / home / nodejs, use LS command to view the status of the current directory, which shows that the installation is successful

at this time, switch to node-v6.10.2-linux-x64. Tar. XZ through CD command, In the bin directory, enter. / node - V. if the version number of the node appears, it will succeed
mongodb
the installation procere is the same as node, but after decompressing and installing, rename the installation package, change the name of the installation package to mongod (the installation package name before MV), and then enter the directory of mongod to create data, then enter the directory of data to create dB, and then return to the directory of bin to

execute the command. If 27017 appears, the installation is successful

in the installation process, as long as the GIT command has successfully copied the compressed package to the remote server, if it is not found in the x-shell, it means that the path of the file is wrong. It is recommended that CD... Return to the root directory, and then use the dir output to check the path of the file.
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750