Comments (6)
这和操作系统关系不大。
前提:由于项目中依赖了很多第三方库,你需要手动将他们先 go get 一下
配置数据库
- 你需要创建数据库并导入
database.sql
的脚本 - 你需要修改
Config/MySql.go
文件中的数据库配置
这个时候配置类的已经完成,如果在本地启动,大概是这样:
- 启动 http 服务端,执行
go run App/Server.go
即可 - 执行爬虫任务(因为是本地暂时不用定时任务),执行
go run App/GetHot.go
即可 - 使用浏览器打开
Html/hot.html
文件,使用 goland 直接右击使用浏览器打开就可以。
from toplist.
执行客户端文件出错
config没有修改,发现涉及到文件目录的都是相对路径。
执行用户端的地方出现问题go run APP/GetHot.go
,会报错:2019/09/02 17:45:57 错误:dial tcp: lookup tcp/port: getaddrinfow: The specified class was not found.
google了并没有出现能够解决这个问题的结果,搜索了issue也没有找到对应的解决方案 T.T,还请大佬帮忙判断一下哪里出了问题:)
from toplist.
syscall.SIGUSR1 windows 下编译报错。
from toplist.
Administrator@WINDOWS-O8ROA6P MINGW32 /e/project-example/go-project
$ go run App/Server.go
parse mysql config once. filePath: E:\project-example\go-project\Config\mysql.toml
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x20 pc=0x74c784]
goroutine 1 [running]:
sync.(*Mutex).Lock(...)
D:/Go/src/sync/mutex.go:74
database/sql.(*DB).SetMaxOpenConns(0x0, 0x7d0)
D:/Go/src/database/sql/sql.go:899 +0x34
/E/project-example/go-project/Common.init.0()
E:/project-example/go-project/Common/Db.go:41 +0xe7
exit status 2
Administrator@WINDOWS-O8ROA6P MINGW32 /e/project-example/go-project
from toplist.
from toplist.
from toplist.
Related Issues (20)
- 榜单重复
- 部分网站抓取的URL没有SCHEME(http),如果用webview就无法打开了
- [feature] url 导航
- ...
- 前端代码没开源吗?
- 旧版鱼塘,这两天首页标题下面的简述内容大面积重复了!强刷也没用
- 是否可以考虑一下Android的兼容性,这样手机上也能看
- 抖音可以开源一下吗
- 不需要代理吗?
- 目前有单个IP访问api的次数限制吗?
- 网页无法打开 HOT 1
- 4d
- 飞客茶馆的域名变了能否适配下?
- 域名被夸克浏览器禁了
- 挂了么 拒绝访问了 == HOT 1
- Config/mysql.toml没这个文件啊
- Bug
- Top hub daily quotes for day good
- 是否考虑过储存每日热点,后续可根据日期查看当日热点? HOT 1
- mysql.toml怎么配置,有配置好的大佬吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toplist.