mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Nuweb drop
Signed-off-by: root <root@tdm-cloud.(none)>
This commit is contained in:
parent
ee9a720f67
commit
a7b55553ad
62 changed files with 1772 additions and 608 deletions
|
|
@ -1,15 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
nuweb_start=$(date +%s.%N)
|
||||
nuweb_stop() {
|
||||
stop=$(date +%s.%N)
|
||||
nux.log info Finished: "${REQUEST_URI} $(echo "$stop - $nuweb_start" | bc)"
|
||||
}
|
||||
trap nuweb_stop EXIT
|
||||
|
||||
|
||||
readonly NUWEB_BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
||||
source $NUWEB_BIN_DIR/../inc/nux-base.inc.sh
|
||||
source $NUWEB_BIN_DIR/../inc/nux.inc.sh
|
||||
|
||||
|
||||
|
||||
|
||||
nux.use nuweb
|
||||
umask 0002
|
||||
|
||||
dirty.url.decode() {
|
||||
sed -e "s/%20/ /gi" <<< "$@"
|
||||
}
|
||||
|
||||
nux.log.level debug
|
||||
NUWEB_SCRIPT_URI="${SCRIPT_FILENAME#$DOCUMENT_ROOT}" \
|
||||
NUWEB_MAYBE_PWD="$DOCUMENT_ROOT$(dirty.url.decode "${REQUEST_URI%%\?*}")" \
|
||||
NUWEB_REQUEST_PATH="${REQUEST_URI%%\?*}" \
|
||||
source "$1"
|
||||
|
||||
DOCUMENT_ROOT=${DOCUMENT_ROOT%/}
|
||||
NUWEB_SCRIPT_URI="${SCRIPT_FILENAME#$DOCUMENT_ROOT}"
|
||||
NUWEB_SCRIPT_DIR_URI="${NUWEB_SCRIPT_URI%/*}"
|
||||
NUWEB_MAYBE_PWD="$DOCUMENT_ROOT$(dirty.url.decode "${REQUEST_URI%%\?*}")"
|
||||
NUWEB_REQUEST_PATH="${REQUEST_URI%%\?*}"
|
||||
nux.dsl.exec nux.nuxsh.language.def "$1"
|
||||
|
|
|
|||
30
bin/nweb-old
Executable file
30
bin/nweb-old
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo Content-Type: text/html
|
||||
echo
|
||||
echo
|
||||
|
||||
env
|
||||
exit 0
|
||||
|
||||
|
||||
readonly NUWEB_BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
||||
source $NUWEB_BIN_DIR/../inc/nux.inc.sh
|
||||
|
||||
nux.use nuweb
|
||||
umask 0002
|
||||
|
||||
dirty.url.decode() {
|
||||
sed -e "s/%20/ /gi" <<< "$@"
|
||||
}
|
||||
nux.log.level debug
|
||||
|
||||
NUWEB_SCRIPT_URI="${SCRIPT_FILENAME#$DOCUMENT_ROOT}" \
|
||||
NUWEB_MAYBE_PWD="$DOCUMENT_ROOT$(dirty.url.decode "${REQUEST_URI%%\?*}")" \
|
||||
NUWEB_REQUEST_PATH="${REQUEST_URI%%\?*}" \
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
nux.dsl.exec nux.nuxsh.language.def "$1"
|
||||
|
|
@ -1 +0,0 @@
|
|||
nuweb-run
|
||||
Loading…
Add table
Add a link
Reference in a new issue