This repository has been archived on 2022-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
mydraftcc-nodejs-server/server/start.sh

23 lines
481 B
Bash
Raw Permalink Normal View History

#!/bin/bash
## those dirs are needed
pwd
for dir in "data logs"
do
if [ -d "$dir" ];then mkdir "$dir";fi
done
# Where is node or nodejs (alpine <> debian)
NODEJS="/usr/bin/nodejs"
if [ ! -f "$NODEJS" ];then
NODEJS="/usr/bin/node"
fi
2022-06-05 12:29:42 +00:00
npm install
## Start application
# Parameters
# listening ip address
# listening port
# Storage: maximum size of the drawing file
# (2Mo : 2 * 1024 * 1024) = 2097152
IPADDRESS=0.0.0.0 PORT=4000 JSONMAXSIZE=2097152 $NODEJS app.js