![]() |
install | documentation | examples | articles | changelog 16.6.0 released on Mar 08, 2023 | articles updated on Mar 20, 2023
|
then you can send requests to it and receive replies:vf -w 3 <app name>
If you're running your application on TCP/IP instead of Unix socket (as above), for instance on TCP port 3000:export REQUEST_METHOD=GET export SCRIPT_NAME="/<app name>" export PATH_NAME="/<request name>" export QUERY_STRING="par1=val1&par2=val2.." cgi-fcgi -connect /var/lib/vv/<app name>/sock/sock /<app name>
then you can send requests to it and receive replies:vf -w 3 -p 3000 <app name>
cgi-fcgi -connect 127.0.0.1:3000 /
# #Create hello_1.vely source file # echo '#include "vely.h" void hello_1() { out-header default @Hello World #1 }' > hello_1.vely # #Create hello_2.vely source file # echo '#include "vely.h" void hello_2() { out-header default @Hello World #2 }' > hello_2.vely # #Create Vely application named "hithere" # sudo vf -i -u $(whoami) hithere # #Make the application # vv -q # #Stop (any) running server processes #Start 2 workers for your application running as FastCGI server via Unix sockets # vf -m quit hithere vf -w 2 hithere # #Send request to execute hello_1() function. # export REQUEST_METHOD=GET export SCRIPT_NAME="/hithere" export PATH_INFO="/hello_1" export VV_SILENT_HEADER=no cgi-fcgi -connect /var/lib/vv/hithere/sock/sock /hithere # #Restart your application as FastCGI server running on TCP port 3000 #Then send request to execute hello_2() function. # vf -m quit hithere vf -p 3000 -w 2 hithere export REQUEST_METHOD=GET export SCRIPT_NAME="/hithere" export PATH_INFO="/hello_2" export VV_SILENT_HEADER=no cgi-fcgi -connect 127.0.0.1:3000 / # #Run your application as command line program. Supress HTTP headers. # export REQUEST_METHOD=GET export SCRIPT_NAME="/hithere" export PATH_INFO="/hello_2" export VV_SILENT_HEADER=no /var/lib/vv/bld/hithere/hithere