Skip to content

Commit

Permalink
Initial Node server
Browse files Browse the repository at this point in the history
  • Loading branch information
223880 committed Jun 24, 2024
1 parent e6a96e7 commit deaafae
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/lightning/server/node.rs
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
use crate::server::Server;

pub struct Node {
pub server: Server,
}

impl Node {
pub fn new() -> Node {
Node {
server: Server::new(),
}
}
}

impl Node {
pub fn start(&self) {
self.server.start();
}
}

impl Drop for Node {
fn drop(&mut self) {
self.server.stop();
}
}

#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}


0 comments on commit deaafae

Please sign in to comment.