Skip to content

liyunghao/Online-Eletronic-Voting

Repository files navigation

Fault Tolerant Computing Term Project

Setup Dev Environment

  • node 17.7.2
  • go 1.18
  • protoc 3.6.1

OSX

# Install Golang compiler & toolchain
# Mac -> install with brew or directly download binary from the website
brew install go

# Install golangci-lint for linter
brew install golangci-lint

# Install protobuf compiler
brew install protobuf

# Node env can be managed with nvm package manager.
# Initialize Npm Dev Environment
npm install

Linux

sudo apt-get update

# Don't forget to check the version
sudo apt-get install golang-go

# Install golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2

# Install protobuf compiler
sudo apt-get install protobuf-compiler

# Install plugins for protobuf compiler to generate go
go get google.golang.org/protobuotoc-gen-go@v1.26
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1

Build

Build Commands

# This will build the project and output the binary
make build

# Build independent test
make build-test

# Clean the artifacts
make clean

Build with docker

# Run in root directory
docker build -f build/package/prod.dockerfile -t online-voting-system .

Start the Server

Start with Docker-Compose

docker-compose up

Server will open port from both instance from 8080 and 8081

References

Development Documents

Style Guild:

About

Term project of Fault Tolerant Computing in NYCU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •