Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rust-swerve
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Louis
rust-swerve
Commits
bbc563d6
Unverified
Commit
bbc563d6
authored
7 years ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Update cli help text to include license information
parent
b4b1fd82
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cli/cli.rs
+22
-13
22 additions, 13 deletions
src/cli/cli.rs
src/cli/gpl.rs
+8
-0
8 additions, 0 deletions
src/cli/gpl.rs
src/cli/mod.rs
+2
-0
2 additions, 0 deletions
src/cli/mod.rs
with
32 additions
and
13 deletions
src/cli/cli.rs
+
22
−
13
View file @
bbc563d6
pub
const
USAGE
:
&
'static
str
=
"
pub
const
USAGE
:
&
'static
str
=
"
Static file swerver and api mocker for local development.
For full documentation,
Static file swerver and api mocker for local development.
visit https://swerve.louiscap.io.
For full documentation,
visit https://swerve.louiscap.io.
Usage:
Usage:
swerve [options]
swerve [options]
Options:
General Options:
-h, --help Display this text
-h, --help Display this text
-q, --quiet Don't print anything to stdout
-q, --quiet Don't print anything to stdout
--no-index Don't serve index.html files for directory paths
--license Show the GPL v3 license text
-d=<path>, --dir=<path> Root directory; defaults to cwd
-p=<port>, --port=<port> Port; defaults to 8200
Web Server Options:
-a=<addr>, --address=<addr> Address to bind to (e.g. 10.0.0.15); defaults to localhost
--no-index Don't serve index.html files for directory paths
-c=<path>, --config=<path> Path to the .swerve config file
-d=<path>, --dir=<path> Root directory; defaults to cwd
-t=<num>, --threads=<num> Number of worker threads to use for serving files; defaults to 32
-p=<port>, --port=<port> Port; defaults to 8200
-u, --upload Support file uploads to '/upload'
-a=<addr>, --address=<addr> Address to bind to (e.g. 10.0.0.15); defaults to localhost
-U=<path>, --upload-path=<path> Set the url path that will accept file uploads. Implies -u if not present
-c=<path>, --config=<path> Path to the .swerve config file
-t=<num>, --threads=<num> Number of worker threads to use for serving files; defaults to 32
Data Handling Options
-u, --upload Support file uploads to '/upload'
-U=<path>, --upload-path=<path> Set the url path that will accept file uploads. Implies 'upload' flag if not present
Swerve Copyright (C) 2018 Louis Capitanchik
Licensed under GPLv3+
"
;
"
;
#[derive(Debug,
Deserialize,
Clone)]
#[derive(Debug,
Deserialize,
Clone)]
...
@@ -30,4 +38,5 @@ pub struct Args {
...
@@ -30,4 +38,5 @@ pub struct Args {
pub
flag_no_index
:
bool
,
pub
flag_no_index
:
bool
,
pub
flag_upload
:
bool
,
pub
flag_upload
:
bool
,
pub
flag_upload_path
:
Option
<
String
>
,
pub
flag_upload_path
:
Option
<
String
>
,
pub
flag_license
:
bool
,
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/cli/gpl.rs
0 → 100644
+
8
−
0
View file @
bbc563d6
use
std
::
process
;
const
LICENSE
:
&
'static
str
=
include_str!
(
"../../COPYING"
);
pub
fn
show_license_and_exit
()
{
println!
(
"{}"
,
LICENSE
);
process
::
exit
(
0
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/cli/mod.rs
+
2
−
0
View file @
bbc563d6
mod
cli
;
mod
cli
;
mod
config_file
;
mod
config_file
;
pub
mod
gpl
;
pub
use
self
::
cli
::{
Args
,
USAGE
};
pub
use
self
::
cli
::{
Args
,
USAGE
};
pub
use
self
::
config_file
::{
HandlerMethod
,
SwerveConfig
};
pub
use
self
::
config_file
::{
HandlerMethod
,
SwerveConfig
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment