Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leehuwuj/hackernews-rustapi
Learn Rust by implementing Hackernews API crawler
https://github.com/leehuwuj/hackernews-rustapi
rust
Last synced: 10 days ago
JSON representation
Learn Rust by implementing Hackernews API crawler
- Host: GitHub
- URL: https://github.com/leehuwuj/hackernews-rustapi
- Owner: leehuwuj
- Created: 2022-12-24T15:03:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T11:19:25.000Z (about 2 years ago)
- Last Synced: 2024-12-23T06:06:20.386Z (16 days ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hackernews API crawler
- Forked from: https://github.com/zhangjinpeng1987/hackernews-crawler
- I reimplement the project to learn Rust.## Todo:
- [x] Generic store
- [x] Postgres
- [x] Sqlite
- [-] File
- [x] Asynchronous API
- [ ] Real-time event# How to?
## Build:
```shell
cargo build
```## Test:
- Test specified module
```shell
cargo test ext::sqlite
```
- or test all
```shell
cargo test
```## Run:
- Store to Sqlite:
```shell
crawler --store sqlite --store-uri=
```
- Store to Postgres:
```shell
crawler --store postgres --store-uri=
```