Git Product home page Git Product logo

goweb's Introduction

简介

一个由Go语言写的程序员网址导航,聚合go生态比较热门的技术栈。

星星增长趋势

Stargazers over time

asy 2.1.2 Released 2021年02月11日

  • 仓库更新到最新的 go-micro
  • 将微服务改成 gRPC
  • 完成 iris、gin、go-micro 技术大升级
  • iris 显示内容渲染,gin 实现接口,go-micro 微服务
  • 一个应用启用三个端口,web、api、srv各占一个
  • 内容管理项目移入另一个独立仓库
  • 内容管理仓库(https://github.com/iissy/hrefs.cn)
  • 内容管理项目用到的接口在此项目
  • 内容展示这个项目可以独立跑
  • 旧代码见 old 分支

技术栈

  • go iris 网页 / go gin 接口
  • go-micro (内置gRPC)微服务框架
  • consul 服务注册发现
  • 分组路由
  • 中间件实现授权访问
  • redis 管理登陆会话
  • 日志错误管理
  • ORM 框架引入 gorp
  • 图片上传,google.uuid 生成文件名
  • 使用 Go Module 方式开发

内容包含

  • 技术原创文章
  • 优秀技术网摘
  • 程序员常用网址

安装说明

  1. 安装 mysql
  2. 使用 hrefs.cn.sql 初始化数据库以及数据
  3. 安装 redis(不启用内容管理可以不装)
  4. 修改配置(conf/config.json)
  5. 内容管理代码仓库:https://github.com/iissy/hrefs.cn

组件下载配置

由于大陆网络无法下载google的包,使用七牛公司的代理,下载包前执行命令

  1. go env -w GOPROXY=https://goproxy.cn,direct

使用说明

  • 请确保 80 端口没有被别的服务(比如iis)占用,然后在浏览器中输入:http://localhost
  • 如果需要添加修改数据,必须搭建内容管理项目,见安装说明

官方产品

goweb's People

Contributors

iissy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goweb's Issues

登录不了

2021-10-29 16:07:50 level=info Starting [service] micro.hrefs.srv
2021-10-29 16:07:50 level=info Server [grpc] Listening on [::]:30004
2021-10-29 16:08:11 level=error Server register error: Put "http://192.168.111.151:8500/v1/agent/service/register": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2021-10-29 16:09:02 level=error Server register error: Put "http://192.168.111.151:8500/v1/agent/service/register": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2021-10-29 16:09:32 level=error Server register error: Put "http://192.168.111.151:8500/v1/agent/service/register": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
{"id":"go.micro.client","code":500,"detail":"error selecting micro.hrefs.srv node: Get "http://192.168.111.151:8500/v1/health/service/micro.hrefs.srv?stale=\": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.","status":"Internal Server Error"}
0time="2021/10/29 16:09:42" level=error msg="{"id":"go.micro.client","code":500,"detail":"error selecting micro.hrefs.srv node: Get \"http://192.168.111.151:8500/v1/health/service/micro.hrefs.srv?stale=\\\": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.","status":"Internal Server Error"}, url = /login"
time="2021/10/29 16:09:42" level=info msg="25.0062956s /login"
2021/10/29 16:09:42 [ERR] consul.watch: Watch (type: services) errored: Get "http://192.168.111.151:8500/v1/catalog/services": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond., retry in 5s
{"id":"go.micro.client","code":500,"detail":"error selecting micro.hrefs.srv node: Get "http://192.168.111.151:8500/v1/health/service/micro.hrefs.srv?stale=\": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.","status":"Internal Server Error"}
0time="2021/10/29 16:09:59" level=error msg="{"id":"go.micro.client","code":500,"detail":"error selecting micro.hrefs.srv node: Get \"http://192.168.111.151:8500/v1/health/service/micro.hrefs.srv?stale=\\\": dial tcp 192.168.111.151:8500: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.","status":"Internal Server Error"}, url = /login"
time="2021/10/29 16:09:59" level=info msg="21.0291967s /login"

Vue.js

这里面用到vue.js了吗?
我从网站上跳过来的,浏览了一下代码,没有找到vue相关的东西呢

正在学习golang 没用过go-micro

正在学习golang 没用过go-micro ,
windows下安装consul后,protobuf-3.6.1也配置了,启动
go run main.go 跑了一下,能进主界面,但是接口全部 timeout ,是不是我的go-micro 缺了什么东西
能否把完整的二次开发流程补一下?

2点建议

  1. 做网址导航不需要mysql,sqlite绰绰有余,可免去部署mysql
  2. 构建docker镜像

go run main.go报错

app.StaticServe undefined (type *iris.Application has no field or method StaticServe)
为啥我的main.go 11行调用的iris StaticServe没有这个方法

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.