pzzld-server 0.0.2

A production ready server optimized for WASM applications
Documentation
/*
    Appellation: puzzled <library>
    Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # puzzled
//!
//! `puzzled` is a library for creating and managing a network of nodes.
#[doc(inline)]
pub use self::{
    config::Settings,
    consts::*,
    error::Error,
    platform::{Context, Platform},
    traits::prelude::*,
    types::prelude::*,
    utils::*,
};

#[macro_use]
pub(crate) mod macros;
pub(crate) mod utils;

pub mod cli;
pub mod config;
pub mod error;
pub mod platform;
pub mod traits;
pub mod types;
pub mod workers;

pub mod prelude {
    pub use super::consts::*;

    pub use super::cli::prelude::*;
    pub use super::config::prelude::*;
    pub use super::error::Error;
    pub use super::platform::prelude::*;
    pub use super::traits::prelude::*;
    pub use super::types::prelude::*;
    pub use super::workers::prelude::*;
}

pub mod consts {
    /// The name of the application.
    pub const APP_NAME: &str = "pzzld";
    /// The name of the artifacts directory.
    pub const ARTIFACTS: &str = ".artifacts";
    /// The default location for the configuration directory.
    pub const DEFAULT_CONFIG_DIR: &str = ".config";
    /// A str constant for the localhost address.
    pub const LOCALHOST: &str = "127.0.0.1";

    pub const DEFAULT_HOST: &str = "0.0.0.0";
    /// The default port for the application.
    pub const DEFAULT_PORT: u16 = 8080;

    pub const DEFAULT_CONTEXT: &str = ".pzzld";

    pub const DEFAULT_WORKDIR: &str = "dist";

    #[allow(unused)]
    pub(crate) const ROOT: &str = env!("CARGO_MANIFEST_DIR");
}