Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
auth
cmd
docs
feed
follow
post
static
storage
user
web
.gitignore
.vimrc
README.md
demo.md
gen-proto-go.sh
go.mod
m3.png
main.go
raft.sh
run.sh
stop.sh
warmup.sh

README.md

M3

Prerequisites

go1.11

Please follow these instructions.

Bash Dependencies

sudo apt-get install -y curl git-core

Go Dependencies

go get github.com/spf13/cobra
go get github.com/pkg/errors
go get github.com/etcd-io/etcd
go get github.com/mattn/goreman
go get github.com/gogo/protobuf/proto
go get github.com/hashicorp/raft
go get github.com/google/uuid
rm -rf $GOPATH/src/go.etcd.io/etcd/vendor/golang.org/x/net/trace

Node.js v11.x

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs

gRPC

go get -u google.golang.org/grpc

Protocol Buffers v3

cd Downloads/
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
unzip protoc-3.6.1-linux-x86_64.zip -d protoc-3.6.1-linux-x86_64/
export PATH=$PATH:~/Downloads/protoc-3.6.1-linux-x86_64
go get -u github.com/golang/protobuf/protoc-gen-go
export PATH=$PATH:$GOPATH/bin

Build

mkdir ~/go/src/github.com/mds796
git clone git@github.com:mds796/CSGY9223-Final.git ~/go/src/github.com/mds796/CSGY9223-Final
cd ~/go/src/github.com/mds796/CSGY9223-Final/static/
npm install

Run

Start

cd ~/go/src/github.com/mds796/CSGY9223-Final/static
npm run build:static
cd ../
go build
./CSGY9223-Final web start&
./CSGY9223-Final user start&
./CSGY9223-Final auth start&
./CSGY9223-Final post start&
./CSGY9223-Final follow start&
./CSGY9223-Final feed start&
./raft.sh&

Alternatively, you can just do:

cd ~/go/src/github.com/mds796/CSGY9223-Final
./run.sh

Stop

cd ~/go/src/github.com/mds796/CSGY9223-Final
./CSGY9223-Final web stop
./CSGY9223-Final user stop
./CSGY9223-Final auth stop
./CSGY9223-Final post stop
./CSGY9223-Final follow stop
./CSGY9223-Final feed stop
pgrep etcd | xargs kill -9

Alternatively, you can just do:

cd ~/go/src/github.com/mds796/CSGY9223-Final
./stop.sh
You can’t perform that action at this time.