auric 0.1.5

CLI for the Ember-inspired Auric SPA framework
use anyhow::Result;
use auric_runtime::{AuricRoute, Config};
use auric_runtime::async_trait::async_trait;
use auric_runtime::routing::Route;
use serde_json::{Value, json};

#[derive(AuricRoute, Debug, Default)]
#[route("{{path}}")]
pub struct {{structName}} {}

#[async_trait]
impl Route for {{structName}} {
    fn init(&mut self, _config: &Config) -> Result<()> {
        Ok(())
    }

    async fn model(&self, _params: &[Value]) -> Result<Value> {
        Ok(json!({}))
    }
}

#[cfg(test)]
mod tests {
    use super::{{structName}};

    #[test]
    fn can_construct() {
        let _ = {{structName}}::default();
    }
}