Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wgr-sa/rs-zip-service
https://github.com/wgr-sa/rs-zip-service
http rust s3 stream zip
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wgr-sa/rs-zip-service
- Owner: WGR-SA
- Created: 2023-09-13T14:26:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-04T22:21:26.000Z (10 months ago)
- Last Synced: 2024-03-04T23:35:28.514Z (10 months ago)
- Topics: http, rust, s3, stream, zip
- Language: Rust
- Homepage:
- Size: 120 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
create a .env file:
```bash
XXX_STORAGE_PROVIDER=openstack
XXX_STORAGE_URL=
XXX_STORAGE_USER=
XXX_STORAGE_SECRET=
XXX_STORAGE_REGION=
XXX_STORAGE_BUCKET=YYY_STORAGE_PROVIDER=s3
...
PORT=3000```
```bash
RUST_LOG=info cargo run
cargo build --release
```then add /etc/systemd/system a zip.service file
```bash
[Unit]
Description=Rust Actix Zip Service
After=network.target[Service]
Type=simple
User=root
WorkingDirectory=/var/www/rs-zip-service
Environment="RUST_LOG=info"
ExecStart=/var/www/rs-zip-service/target/release/zip_service
Restart=always
StandardOutput=append:/var/log/zip_service.log
StandardError=append:/var/log/zip_service-error.log[Install]
WantedBy=multi-user.target
````run
```bash
sudo systemctl start zip.service
```then test!
```bash
wget --quiet \
--method GET \
--header 'X-Client: CLIENT_A_SECRET' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnQiOiJDTElFTlRfQV9TRUNSRVQiLCJleHAiOjE3MzE3ODQ4ODZ9.efHZ435qFrds-7bprQAy-fy5YbjeL4rerZIY6ruefC8' \
--output-document \
- http://localhost:8080/
```