Browse Source

Remove the microservices thing, make a monolith instead

master
Julio Biason 6 years ago
parent
commit
3646f7f714
  1. 3
      .gitignore
  2. 7
      Cargo.toml
  3. 13
      README.md
  4. 3
      src/main.rs
  5. 9
      templater/Cargo.toml
  6. 27
      templater/src/main.rs

3
.gitignore vendored

@ -2,3 +2,6 @@
.idea .idea
**/target/** **/target/**
/target
**/*.rs.bk

7
Cargo.toml

@ -0,0 +1,7 @@
[package]
name = "downfav"
version = "0.1.0"
authors = ["Julio Biason <julio.biason@pm.me>"]
edition = "2018"
[dependencies]

13
README.md

@ -1,13 +0,0 @@
# Downfav
Download your favorites/likes from Mastodon/Twitter.
## Architecture
This is mostly an experiment in creating microservices with Rust.
* `template` is a microservice that receives a template name and some data and
renders the template back to disk. Uses:
* [Actic-web](https://github.com/actix/actix-web) for the web interface.
* [Clap](https://github.com/clap-rs/clap) for the command line options.
* [Log-Derive](https://github.com/elichai/log-derive) for logging.

3
src/main.rs

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

9
templater/Cargo.toml

@ -1,9 +0,0 @@
[package]
name = "templater"
version = "0.1.0"
authors = ["Julio Biason <julio.biason@gmail.com>"]
edition = "2018"
description = "Generate files based on templates."
[dependencies]
clap = "2.32"

27
templater/src/main.rs

@ -1,27 +0,0 @@
use clap::App;
use clap::Arg;
use clap::crate_name;
use clap::crate_version;
use clap::crate_authors;
use clap::crate_description;
fn main() {
let params = App::new(crate_name!())
.version(crate_version!())
.author(crate_authors!())
.about(crate_description!())
.arg(Arg::with_name("bind")
.short("b")
.long("bind")
.value_name("ADDRESS")
.help("Binding address for the service")
.takes_value(true))
.arg(Arg::with_name("port")
.short("p")
.long("port")
.value_name("PORT")
.help("Port to bind")
.takes_value(true))
.get_matches();
println!("Hello, world!");
}
Loading…
Cancel
Save