0.23.0 • Published 17 days ago
@teqfw/web v0.23.0
@teqfw/web
CAUTION: TeqFW is an unstable project w/o backward compatibility. Use it at your own risk. |
---|
This teq
-plugin adds basic web server functionality to Tequila Framework based projects.
- console commands to start/stop web server in HTTP/1.1, HTTP/2, HTTPS modes;
- basic web requests processing with possibility to add various handlers;
- requests handlers:
TeqFw_Web_Back_App_Server_Handler_Final
: unprocessed requests responder;TeqFw_Web_Back_App_Server_Handler_Static
: GET requests for static resources;TeqFw_Web_Back_App_Server_Handler_Config
: GET requests to load various frontend configurations;
TODO
- move the IndexedDB functionality to some external plugin (@teqfw/front-idb?)
Install
$ npm i @teqfw/web --save
Namespace
This plugin uses TeqFw_Web
namespace.
CLI commands
$ node ./bin/tequila.mjs help
Usage: tequila [options] [command]
...
Commands:
web-server-start [options] Start web server.
web-server-stop Stop web server.
$ node ./bin/tequila.mjs help web-server-start
...
Options:
-c, --cert <path> certificates chain in PEM format to secure HTTP/2 server
-1, --http1 use HTTP/1 server (default: HTTP/2)
-k, --key <path> private key in PEM format to secure HTTP/2 server
-p, --port <port> port to use (default: 8080)
-s, --skipPid don't save PID file (used for read-only filesystems like Google AppEngine)
-w, --useWs use web sockets with this server
-h, --help display help for command
./cfg/local.json
DTO for @teqfw/web
node.
{
"@teqfw/web": {
"server": {
"port": 8080,
"secure": {
"cert": "/path/to/cert.pem",
"key": "/path/to/key.pem"
},
"useHttp1": false
},
"urlBase": "domain.com"
}
}
teqfw.json
DTO for @teqfw/web
nodes in teq
-plugins descriptors.
{
"@teqfw/web": {
"doors": ["admin", "pub"],
"excludes": {
"handlers": ["Ns_Mod"]
},
"handlers": {
"Ns_Mod": {
"after": ["Ns_Mod"],
"before": ["Ns_Mod"],
"spaces": ["custom"]
}
},
"statics": {
"/url-path/": "/filesystem-path/"
}
}
}
0.23.0
17 days ago
0.22.0
2 months ago
0.21.0
2 months ago
0.20.1
8 months ago
0.20.0
8 months ago
0.20.2
8 months ago
0.10.0
11 months ago
0.11.0
11 months ago
0.9.0
12 months ago
0.8.1
1 year ago
0.8.0
1 year ago
0.8.2
1 year ago
0.7.1
2 years ago
0.7.0
2 years ago
0.6.1
3 years ago
0.6.0
3 years ago
0.5.0
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago