1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
//!
//! ## Features
//!
//! - **Asynchronous**: Built on the Tokio runtime for powerful non-blocking I/O.
//! - **Robust**: Offers a rich set of functionalities tailored for scientific computing and web development.
//! - **Extendable**: Easily integrate with other data storage solutions such as MongoDB, PostgreSQL, and Redis.
//! - **CLI Tool**: A dedicated CLI (`fluxor_cli`) for project scaffolding to expedite the development process.
//! - **Modular**: Comprises various modules like math, data handling, logging, and more to facilitate streamlined development.
//!
//! ## Getting Started
//!
//! To begin using Fluxor, ensure that you have [Rust](https://www.rust-lang.org/tools/install) installed on your system. You can either create a new Fluxor project or add Fluxor to an existing project.
//!
//! ### Option 1: Adding Fluxor to an Existing Project
//!
//! If you're starting from scratch, you can add Fluxor directly to a new or existing Rust project using Cargo:
//!
//! 1. Create a new Rust project:
//!
//! ```terminal
//!
//! cargo new <project_name>
//! cd <project_name>
//!
//! ```
//!
//! 2. Add Fluxor as a dependency:
//!
//! ```terminal
//!
//! cargo add fluxor
//!
//! ```
//!
//! ### Option 2: Creating a New Fluxor Project with the Fluxor CLI
//!
//! If you prefer to use the Fluxor CLI to create a new project, you can do so with the following commands:
//!
//! 1. First, install the Fluxor CLI:
//!
//! ```terminal
//!
//! cargo install fluxor_cli
//!
//! ```
//!
//! 2. Create a new Fluxor project:
//!
//! ```terminal
//!
//! fluxor new <project_name> --version latest --example helloworld
//!
//! ```
//!
//! Replace `<project_name>` with your desired project name.
//!
//! Once the project scaffolding is complete, navigate into your project directory:
//!
//! ```terminal
//!
//! cd <project_name>
//!
//! ```
//!
//! Now, you can build and run your Fluxor application:
//!
//! ```terminal
//!
//! cargo run
//!
//! ```
//!
//! Your application should now be running on `http://127.0.0.1:8080`.
//!
//! ## Examples
//!
//! ### Hello World Example
//!
//! A basic Fluxor application that responds with "Hello, World!" when accessed via a web browser.
//!
//! ```no_run
//!
//! use fluxor::prelude::*;
//!
//! fn hello(_req: Req, _params: Params) -> Reply {
//! boxed(async {
//! Ok(Response::builder()
//! .header("Content-Type", "text/html; charset=UTF-8")
//! .body(Body::from("<h1>👋 Hello, World!</h1>"))
//! .unwrap())
//! })
//! }
//!
//! #[tokio::main]
//! async fn main() {
//! let mut app = Fluxor::new(); // Initialize the application.
//! app.route(GET, "/", hello); // Set the route (method, path, handler).
//! app.run("127.0.0.1", "8080").await; // Start the HTTP server (host, port).
//! }
//!
//! ```
//!
//! ### API Examples
//!
//! A simple Fluxor API endpoint that returns a JSON response (method: GET).
//!
//! ```no_run
//!
//! use fluxor::prelude::*;
//!
//! fn hello(_req: Req, _params: Params) -> Reply {
//! boxed(async move {
//! let json_response = format!(r#"{{"message": "👋 Hello, World!"}}"#);
//!
//! Ok(Response::builder()
//! .header("Content-Type", "application/json")
//! .body(Body::from(json_response))
//! .unwrap())
//! })
//! }
//!
//! #[tokio::main]
//! async fn main() {
//! let mut app = Fluxor::new(); // Initialize the application.
//! app.route(GET, "/", hello); // Set the route (method, path, handler).
//! app.route(GET, "/http-client", serve_http_client); // A simple http client to test your application.
//! app.run("127.0.0.1", "8080").await; // Start the HTTP server (host, port).
//! }
//!
//! ```
//!
//! A simple Fluxor API endpoint that returns a JSON response (method: POST).
//!
//! ```no_run
//!
//! use fluxor::prelude::*;
//!
//! fn hello(_req: Req, _params: Params) -> Reply {
//! boxed(async move {
//! let json_response = format!(r#"{{"message": "👋 Hello, World!"}}"#);
//!
//! Ok(Response::builder()
//! .header("Content-Type", "application/json")
//! .body(Body::from(json_response))
//! .unwrap())
//! })
//! }
//!
//! #[tokio::main]
//! async fn main() {
//! let mut server = Fluxor::new(); // Initialize the application.
//! server.route(POST, "/", hello); // Set the route (method, path, handler).
//! server.route(GET, "/http-client", serve_http_client); // A simple HTTP client to test your application.
//! server.run("127.0.0.1", "8080").await; // Start the HTTP server (host, port).
//! }
//! ```
//!
// Private Core Module
// Public Client Module
// Public WTime Module
// Public Fluxio Module
// Public Cans Module
// Public Cans Module
// Public StyledLog Module
// Public Data Module
// Prelude Module