#!/bin/sh

    CUSTOM_NODE_ARGS=
    CUSTOM_MEMORY_LIMIT=

    # Do not edit below this line
    MEMORY_LIMIT=6144
    if [ -n "$CUSTOM_MEMORY_LIMIT" ] && [ "$MEMORY_LIMIT" -lt "$CUSTOM_MEMORY_LIMIT" ]; then
        MEMORY_LIMIT=$CUSTOM_MEMORY_LIMIT
    fi

    DIST_PATH=$(dirname $0)
    SERVER_DIST_PATH=$DIST_PATH/server
    export PATH=$DIST_PATH/nodejs/bin:$PATH
    export NODE_ENV=production
    node --max_old_space_size=$MEMORY_LIMIT --no-deprecation $CUSTOM_NODE_ARGS "$SERVER_DIST_PATH/server.js" $*

    