Crates.io | netter |
lib.rs | netter |
version | |
source | src |
created_at | 2025-04-10 16:01:12.930009+00 |
updated_at | 2025-04-20 18:41:30.388438+00 |
description | Netter is a CLI tool for fast and easy server startup! |
homepage | |
repository | |
max_upload_size | |
id | 1628533 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Netter is a CLI tool for quickly and easily launching servers.
Launching a server is done using the command:
netter start
Stopping a server is done using the command:
netter stop
The start command accepts the following parameters:
netter start --websocket
netter start --websocket --host 127.0.0.1
netter start --websocket --host 127.0.0.1 --port 808
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.
The stop command will stop any running server:
netter stop
[!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).
In case of errors or questions about installing Rust, you can refer to the documentation in the Rust book.
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
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
cargo install netter
Netter uses the following key libraries:
This command will start the server.
Use:
netter start --http --host 127.0.0.1 --port 8080 --path routes.yaml
Flags:
--http: will start the server in HTTP mode;
--websocket: will start the server in websocket mode;
--grpc: will start the server in gRPC mode;
--tcp: will start the server in TCP mode;
--udp: will start the server in UDP mode;
--host: specifies the host for the server;
--port: specifies the port for the server:
--path: will specify the path to the configuration file for the server;
--protect: whether to use ssl/tls for the server. True or False;
This command will stop the server.
Use:
netter stop