Simplify CLI build process (#7)

This commit is contained in:
Charlie Revett 2018-02-01 10:06:17 -08:00 committed by GitHub
parent a95ce31176
commit 36335e587f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 9 deletions

3
.gitignore vendored
View file

@ -14,4 +14,5 @@
.glide/ .glide/
# Added by CoZ developers # Added by CoZ developers
vendor/ vendor/
bin/

View file

@ -1,2 +1,8 @@
build:
@go build -o ./bin/neo-go ./cli/main.go
deps:
@glide install
test: test:
@go test $(glide nv) -cover @go test $(glide nv) -cover

View file

@ -51,11 +51,17 @@ The project will exist out of the following packages:
## Server ## Server
Install the neoserver cli: Install dependencies, this requires [Glide](https://github.com/Masterminds/glide#install):
``` ```
go install ./cmd/neoserver make deps
``` ```
Build the **neo-go** CLI:
```
make build
```
Currently, there is a minimal subset of the NEO protocol implemented. Currently, there is a minimal subset of the NEO protocol implemented.
To start experimenting make sure you a have a private net running on your machine. To start experimenting make sure you a have a private net running on your machine.
@ -64,20 +70,20 @@ If you dont, take a look at [docker-privnet-with-gas](https://hub.docker.com/r/m
Start the server: Start the server:
``` ```
neoserver -seed 127.0.0.1:20333 ./bin/neo-go -seed 127.0.0.1:20333
``` ```
You can add multiple seeds if you want: You can add multiple seeds if you want:
``` ```
neoserver -seed 127.0.0.1:20333,127.0.01:20334 ./bin/neo-go -seed 127.0.0.1:20333,127.0.01:20334
``` ```
By default the server will currently run on port 3000, for testing purposes. By default the server will currently run on port 3000, for testing purposes.
You can change that by setting the tcp flag: You can change that by setting the tcp flag:
``` ```
neoserver -seed 127.0.0.1:20333 -tcp 1337 ./bin/neo-go -seed 127.0.0.1:20333 -tcp 1337
``` ```
## RPC ## RPC
@ -85,7 +91,7 @@ neoserver -seed 127.0.0.1:20333 -tcp 1337
If you want your node to also serve JSON-RPC, you can do that by setting the following flag: If you want your node to also serve JSON-RPC, you can do that by setting the following flag:
``` ```
neoserver -rpc 4000 ./bin/neo-go -rpc 4000
``` ```
In this case server will accept and respond JSON-RPC on port 4000. In this case server will accept and respond JSON-RPC on port 4000.