longjoy / micro-go-course Goto Github PK
View Code? Open in Web Editor NEW拉勾教育课程源码 《Go 微服务实战 38 讲》
License: MIT License
拉勾教育课程源码 《Go 微服务实战 38 讲》
License: MIT License
Dao层负责数据的处理, Service 负责 逻辑的处理, transport 负责http,grpc协议的处理, endpoint是干嘛的? 没看懂。
user代码设置的mysql密码为"xuan",而部署时,mysql的密码是"123456".导致部署后,user容器启动报错就立即退出
解决方案:
将代码中的mysql改为"123456",然后重新构建镜像,重新部署
请问使用go run main.go启动以后,是使用什么地址来调用?在main.go的代码里没有配置地址。使用http://localhost:10086/register也不行。
main.go的代码:
go func() {
errChan <- http.ListenAndServe(":" + strconv.Itoa(*servicePort), r)
}()
请问可以提供第16课的源码不?
原Dockerfile:
FROM golang:latest
WORKDIR /root/micro-go-course/section10/user
COPY / /root/micro-go-course/section10/user
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go build -o user
ENTRYPOINT ["./user"]
问题:
xxxxx missing go.sum entry
解决方案:
Dockerfile加一行 go mod tidy,新Dockerfile如下:
FROM golang:latest
WORKDIR /root/micro-go-course/section10/user
COPY / /root/micro-go-course/section10/user
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod tidy
RUN go build -o user
ENTRYPOINT ["./user"]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.