Add Node.js application actions to the build script

This commit is contained in:
Starbeamrainbowlabs 2019-08-01 12:33:33 +01:00
parent 519566f031
commit 3062a10058

24
build
View file

@ -35,13 +35,15 @@ if [[ "$#" -lt 1 ]]; then
echo -e "";
echo -e "${CSECTION}Available actions${RS}";
echo -e " ${CACTION}setup${RS} - Perform initial setup";
echo -e " ${CACTION}server-ttn${RS} - Execute the Node.js TTN receiver.";
echo -e " ${CACTION}client${RS} - Build the client-side code.";
echo -e " ${CACTION}client-watch${RS} - Auto-rebuild the client-side code on modification.";
echo -e " ${CACTION}server${RS} - Start a temporary web server for the browser-based web interface.";
echo -e " ${CACTION}server-stop${RS} - Stop a temporary web server.";
echo -e " ${CACTION}ttn-listener${RS} - Execute the Node.js TTN receiver.";
echo -e " ${CACTION}process-data${RS} - Fold the data in 'DATA.TSV' into the database.";
echo -e " ${CACTION}train-ai${RS} - Train the AI(s).";
echo -e " ${CACTION}server${RS} - Start a temporary web server for the web interface.";
echo -e " ${CACTION}server-stop${RS} - Stop a temporary web server.";
echo -e "";
echo -e "${CSECTION}Extra development actions${RS}";
echo -e " ${CACTION}client${RS} - Build the client-side code.";
echo -e " ${CACTION}client-watch${RS} - Auto-rebuild the client-side code on modification.";
echo -e " ${CACTION}render${RS} - Render the report";
echo -e " ${CACTION}geojson-debug${RS} - Generate some GeoJSON from the raw readings for debugging purposes (paste into geojson.io)";
echo -e "";
@ -130,8 +132,16 @@ task_setup() {
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ███████ ██ ███████ ██ ███████ ██ ████ ███████ ██ ██
task_server-ttn() {
execute node --experimental-modules ./server/index.mjs ttn-app-server;
task_ttn-listener() {
execute ./server.sh ttn-app-server;
}
task_train-ai() {
execute ./server.sh train-ai;
}
task_process-data() {
execute ./server.sh process-data DATA.TSV;
}