Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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=
```