https://github.com/burtlo/wraith
Rust (Rocket Diesel) web service to accept InSpec JSON scan data
https://github.com/burtlo/wraith
diesel-rs rocket-rs rust sql sqlite3 webservice
Last synced: about 1 year ago
JSON representation
Rust (Rocket Diesel) web service to accept InSpec JSON scan data
- Host: GitHub
- URL: https://github.com/burtlo/wraith
- Owner: burtlo
- Created: 2018-04-26T14:50:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-26T22:26:41.000Z (almost 8 years ago)
- Last Synced: 2025-02-10T20:27:47.241Z (about 1 year ago)
- Topics: diesel-rs, rocket-rs, rust, sql, sqlite3, webservice
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wraith
A web service written in Rust using the rocket-rs (web) and diesel-rs (database) libraries.
## Background
I wanted to use Rust to setup a web service that is able to accept a JSON document and then display all that content.
I started with the Building a [RESTful CRUD API with Rust](https://medium.com/sean3z/building-a-restful-crud-api-with-rust-1867308352d8) article to get started but then modified it to use SQLlite. This required looking at the diesel-rs [sqllite examples](https://github.com/diesel-rs/diesel/tree/master/examples/sqlite/getting_started_step_3).
## Setup
```
$ rustup default nightly
$ rustup update && cargo update
$ diesel setup
$ diesel migration run
$ cargo build
$ cargo run
```
Then view the site [http://localhost:8000/scans](http://localhost:8000/scans).