robusta
1.0.0
只是一个简单的分享技术知识的网站。现场演示位于:https://goway.herokuapp.com
该项目遵循 golang-standards/project-layout,因此可以作为 Go 新开发人员的参考。
请注意,该项目现在不再处于积极开发状态,但请随意提出拉取请求。
确保您的开发环境与下面的这些注释相匹配,以便我们可以减轻版本不匹配的任何问题。
后端:
$GOROOT和$GOPATH 。您可以通过键入以下命令来检查这些环境变量: go env 。前端:
yarn而不是npm 。公共资源:
Goland或者VS Code 。 $ go get -u -v github.com/pthethanh/robusta
or
$ cd $GOPATH /src
$ git clone https://github.com/pthethanh/robusta.git在此步骤之后,源代码必须在$GOPATH/src/github.com/pthethanh/robusta中可用。
您可以使用 Docker 一次性启动所有服务。这将支持前端和后端自动重新加载
$ cd /web && yarn install && cd ../
$ make compose_dev启动后,服务将在localhost上可用,端口如下:
MongoDB: 27017
Backend: 8080
Frontend: 8081
Google 不支持 localhost 或任何带端口的域的 OAuth,但我们的服务器在 8080 上运行,因此我们需要创建一个名为mylocalhost.com本地域,并确保对该域的所有请求都转发到正在运行的服务器在端口 8080
需要完成以下步骤:
1.更新iptables
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 80802. 更新/etc/hosts
127.0.0.1 mylocalhost.com3.更新Google OAuth2配置
确保mylocalhost.com在 Google Console 中更新 将http://mylocalhost.com/auth/google/callback添加到 Google Console API 的Authorized redirect URIs
make size
有关更多详细信息,请参阅 github 上的大小限制
go fmt 、 go vet 、 go test和go build / go install 。或者你可以在推送之前运行make 。master或develop分支(无论如何,你没有这样做的权限)。相反,从develop分支签出到一个单独的分支,然后进行处理。develop 。master分支。颜色:https://www.colourlovers.com/palette/173625/Browser_wars
需要更新