#startup #stop #sockets #start #routing #netter

app netter

Netter is a CLI tool for fast and easy server startup!

3 unstable releases

Uses new Rust 2024

new 0.2.1 Apr 11, 2025
0.2.0 Apr 10, 2025
0.1.0 Apr 10, 2025

#36 in WebSocket

Download history 247/week @ 2025-04-05

251 downloads per month

MIT license

20KB
414 lines

Netter

Netter is a CLI tool for quickly and easily launching servers.

Table of Contents

Features

  • Support for complex server structures and routing;
  • Support for different types of servers: HTTP, gRPC, TCP/UDP sockets;
  • Support for SSL/TLS.

Functional

  • Creating a server on web sockets (websockets);
  • Stopping any server launched via netter.

Documentation

Launching a server is done using the command:

netter start

Stopping a server is done using the command:

netter stop

Start

The start command accepts the following parameters:

  • --type: server type: websocket, tcp, udp, http, grpc:
netter start --websocket
  • --host: server address:
netter start --websocket --host 127.0.0.1
  • --port: server port:
netter start --websocket --host 127.0.0.1 --port 808
  • --protect: whether to protect or not (default is no. If the flag is absent, it is also no):
netter start --websocket --host 127.0.0.1 --port 8080 --protect

For the type parameter and server protection status, you do not need to specify anything other than the flag itself.

Stop

The stop command will stop any running server:

netter stop

How does it work?

Note

When starting a server (netter start), a server state file is created, which specifies the host, pid, port, and protection status. This file helps maintain the existence of a running server and manage it during the process, as each new command you use = code execution from scratch. The running server will continue to work because it is built on asynchronous operations.
The presence of the pid parameter in the state file helps terminate the server. It indicates the process ID of the server in the system. After using the stop command, netter "kills" the process (stops it).

Installation

In case of errors or questions about installing Rust, you can refer to the documentation in the Rust book.

Windows

  • To install Rust on Windows, you need to go to this link and download the language from there.

  • Then you need to install netter:

cargo install netter

Linux

  • Install Rust:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
  • Install netter:
cargo install netter

Dependencies

~12–19MB
~256K SLoC