Skip to content
No description, website, or topics provided.
Go JavaScript CSS Other
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.
.vscode
amqpconn
configs
controller
middleware
model
schedule
scripts
tools
web
.gitignore
Dockerfile
README.md
bootstrap
deploy.sh
go.mod
go.sum
main.go
mongodb.conf

README.md

ningtogo

www.ningto.com网站使用go语言编写

clone工程

克隆工程到GOPATH的src/ningto.com目录下

go env GOAPTH # 查看gopath目录
/Users/tujiaw/go
cd /Users/tujiaw/go/src/ningto.com
git clone https://github.com/tujiaw/ningtogo.git

安装依赖库

使用了go mod,直接运行go会自动帮我们安装依赖库
使用了replace将golang.org指向了github,解决国内被墙的问题

启动开发工程

必须先启动mongodb

go run main.go # 在8080端口监听

linux上快速

./deploy.sh

docker部署

编译:

docker build -t="tujiaw/ningtogo" .

启动:

docker run --restart=always -v /root/mongodb/db/:/root/mongodb/db/ -d -p8080:8080 -p27017:27017 --name ningtogo tujiaw/ningtogo /bin/bash -c "/root/ningtogo/deploy.sh"
You can’t perform that action at this time.