Vv
Purpose: Builds Vely applications.
vv <options>
vv is a
vely tool for application building.
Command-line options
- -q Build Vely application from source code in the current directory. vf must run first in this directory with "-i" option to create the application. The following options can be used when building:
- --db="[#]<database vendor>:<db config file> ..."
Specify a list of databases used in your application. Each element of the list is <database vendor> (which is 'mariadb', 'postgres' or 'sqlite'), followed by a colon (:) and then <db config file>, where <db config file> is used to refer to a database in statement_APIs such as run-query.
Each <database vendor>:<db config file> is separated by a space. You can list any number of databases for use in your application. A file with name <db config file> must exist and contain the connection parameters for database access, and is copied once to Vely's database configuration directory (see how_vely_works).
If an optional "#" precedes <database vendor>, then database configuration file is overwritten even if already present. See database_config_file for more details on the content of this file, the defaults used, and changing them to fit your needs.
- --lflag <linker flags>
If you wish to add any additional linker flags (such as any non-Vely libraries), specify them quoted under this option.
- --cflag <C flags>
If you wish to add any additional C compiler (gcc) flags, specify them quoted under this option.
- --trace
If specified, tracing information code will be generated (without it, tracing is not available and trace-run statement is ignored). Tracing only works when debugging mode is enabled, so --debug option must be used as well.
- --path <application path>
This option lets you specify the application path for your request_URLs. It is a leading path of a URL prior to request name and any parameters. If empty, the default is the application name preceded by a forward slash:
/<app name>
- --maxupload <max upload size>
Specify maximum upload size for a file (in bytes). The default is approximately 25MB.
- --debug
Generate debugging information when compiling your application. Debugging information is required to produce a backtrace file with the stack that contains source code line numbers, in order to pinpoint the exact location where report-error statement was used, or where the application crashed. It is also needed to use gdb for debugging purposes.
- --c-lines
Skip generating line information when compiling .vely files. By default line information is included, which allows errors to be reported with line numbers in .vely files. If you want only generated C code line numbers to be used, use this option.
- -i
Display both include and linking flags for an application that uses Client_API to connect to Vely FastCGI server. The flags are for C compiler (gcc). If --include is used in addition, then only include flags are displayed. If --link is used in addition, then only linking flags are displayed. Use this to automate building of client applications with tools like Makefile.
- -v
Display Vely version as well as the Operating System version.
- -s
Trace the execution of vv utility and display all the steps in making your application.
- -e <num of errors>
Show the last <num of errors> from the backtrace file, which receives error message and stack trace when program crashes or report-error is issued. Also display the path to backtrace file which contains the stack details.
- -t <num of trace files>
Show the last <num of trace files> most recent trace files for the application. This is useful when tracing (see trace-run) to quickly find the trace files where Vely writes to. Also display the path to backtrace file which contains the stack details.
- -o
Show documentation directory - web page documentation is located here, and examples are located under "examples" subdirectory.
- -l
Show library directory - Vely's libraries and v1 code processor are located there.
- -r [ --req="/<request name><url payload>" ] [ --method="<request method>" ]
Display bash code to run a command-line program. You must be in the source code directory. You can use "--req" option to specify the request name and URL payload (see request_URL), for example it may be:
vv -r --req="/encrypt/data/somedata?method=aes256"
where "/encrypt" gives the request name, and "/data/somedata?method=aes256" represents the URL payload. Or it could be for instance:
vv -r --req="/encrypt?data=somedata&method=aes256"
where "/encrypt" gives the request name, and "?data=somedata&method=aes256" represents the URL payload.
Use --method to specify the HTTP request method, for instance:
vv -r --req="/encrypt/data/somedata?method=aes256" --method=POST
If not specified, the default method is "GET". Either way, the output may look like:
export REQUEST_METHOD=POST
export SCRIPT_NAME="/enc"
export PATH_INFO="/encrypt/data/somedata"
export QUERY_STRING="method=aes256"
/var/lib/vv/bld/enc/enc
Running the above executes the command line program which handles the request specified.
- -u
Read stdin (standard input) and substitute any environment variables in the form of ${<var name>} with their values, and output to stdout (stdout). This is useful in processing configuration files that do not have parameter values hardcoded, but rather take them from the environment.
- -m
Add Vely syntax and keyword highlighting rules for files with .vely extension to Vim editor for the currently logged on user.
- -c,--clean
Clean all object and other intermediate files, so that consequent project build is a full recompilation. Use it prior to rebuilding the application.
- -h
Display help.
Examples
- Make application (-q), use three databases (--db) named mdb (MariaDB database), pdb (PostgreSQL) and sdb (SQLite), produce debugging information (--debug), produce tracing information (--trace), specify that your application is using crypto and curl libraries:
vv -q --db="mariadb:mdb postgres:pdb sqlite:sdb" --debug --trace
- make application, use MariaDB database db (--db), specify linker and C compilation flags, specify maximum upload size of about 18M:
vv -q --db="mariadb:db" --lflag "-Wl,-z,defs" --cflag "-DXYZ123" --maxupload 18000000
- Make application that doesn't use any databases:
vv -q
See also
General (
deploying_application how_vely_works quality_control rename_files SELinux vely vely_architecture vely_removal vf vv why_Vely )
SEE ALL (
documentation)