Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explain run modes #282

Open
qrkourier opened this issue Mar 27, 2024 · 2 comments
Open

explain run modes #282

qrkourier opened this issue Mar 27, 2024 · 2 comments

Comments

@qrkourier
Copy link
Member

This project has several run modes. The readme mentions a "node-api" mode, but doesn't explain precisely what that means or how it's different or if it's the default mode.

Which mode is used when by the Docker container?

Which mode is best for a production server?

#55

@qrkourier
Copy link
Member Author

I believe the two main run modes are:

  1. SPA - HTML, Javascript, CSS are served as static files - Ziti mgmt API requests originate in the user's web browser
  2. Node - standalone Node.js handles web page requests and initiates Ziti mgmt API requests on the backend on behalf of the user

Accurate?

@qrkourier
Copy link
Member Author

The Docker image's entrypoint script has these modes:

if [[ "$1" == "classic" ]]; then
  echo "Running Classic ZAC Application"
  exec node /usr/src/app/server.js classic
elif [[ "$1" == "edge-api" ]]; then
  echo "Running ZAC server with Edge API integration"
  exec node /usr/src/app/server-edge.js
elif (( $#)); then
  echo "Running: server.js $*"
  exec node /usr/src/app/server.js $*
else
  echo "Running ZAC Server with Node API Integration"
  exec node /usr/src/app/server.js node-api
fi

It appears that node-api is the default, and that this is how the standalone Node.js server is run. I'm guessing that node-api means something like "Run the Node server that implements the Ziti mgmt API."

The other modes from the entrypoint are classic (runs server.js classic) and edge-api (runs server-edge.js). How are these different?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant