Setup Spectrum Development Environment on Mac OS

Scott Song
Sep 5, 2018 · 1 min read

install go

brew install govim ~/.bash_profile

edit ~/.bash_profile , add $GOPATH

#replace ~/go_project with your path 
export GOPATH=~/go_project
export PATH=.:$PATH:$GOPATH:$GOPATH/bin

create src,pkg,bin folder under $GOPATH

mkdir -p $GOPATH/bin $GOPATH/pkg $GOPATH/src

test go

source ~/.bash_profile 
go env

install git

brew install git

build Spectrum from source

clone latest source code to $GOPATH

mkdir -p $GOPATH/src/github.com/SmartMeshFoundation 
cd $GOPATH/src/github.com/SmartMeshFoundation
git clone https://github.com/SmartMeshFoundation/Spectrum

build smc

cd $GOPATH/src/github.com/SmartMeshFoundation/Spectrum/ 
go install -v ./cmd/smc

smc excutable file:$GOPAT/bin/smc . test smc

smc console

About IDE

The popular golang IDE under Mac are GoLand,VSCode,GoVim...,choose the IDE you like。

SmartMesh Developer Community

Welcome to contribute, have the opportunity to get SMT rewards, and be invited to join smartmesh developer community.

Scott Song

Written by

SmartMesh Developer Community

Welcome to contribute, have the opportunity to get SMT rewards, and be invited to join smartmesh developer community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade