Skip to content

webfirmframework/wffweb-demo-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wffweb demo app with wffweb-12.0.0

It contains sample code for url rewriting/routing, JWT token based authentication/authorization and configuration for multi node support for scaling.

Fork and Deploy

After deployed to Heroku, set the following config vars in Heroku Settings

Key Value
MAVEN_CUSTOM_GOALS clean package
MAVEN_CUSTOM_OPTS --update-snapshots -DskipTests=true
DOMAIN_URL eg: https://wffweb.herokuapp.com
ORIGIN_DOMAIN_URL same as DOMAIN_URL eg: https://wffweb.herokuapp.com
DOMAIN_WS_URL eg: wss://wffweb.herokuapp.com
SESSION_TIMEOUT (Optional) 5
ENABLE_HEARTBEAT (required only if Heroku) true
This demo project is deployed at wffweb.herokuapp.com
To run this project in your local machine, open this project with IntelliJ IDEA as a maven project and run com.webfirmframework.web.launcher.Main.main method.

How to scale app with multiple nodes?

The only thing you have to do is to deploy this app in multiple server nodes and connect it with a load balancer. No need to configure sticky sessions to the load balancer.

(use your own domain names)

Eg: deploy this wffweb demo app in multiple domain nodes like node1.webfirmframework.com, node2.webfirmframework.com, node3.webfirmframework.com etc... Now create a load balancer in the main domain webfirmframework.com and point it to those subdomain nodes. That's all!

NB: The websocket connection should be publicly accessible in the subdomain nodes. The access to http connection in the subdomain nodes may be limited to the load balancer, to do that, the load balancer should route request to the nodes along with an app key, this app key may be checked in the demo app.