B4J Tutorial [server] Run a Server on Azure as an App Service

Discussion in 'B4J Tutorials' started by xulihang, Oct 16, 2018.

  1. xulihang

    xulihang Active Member Licensed User

    Since Azure supports Jetty, a B4J server app can also run on azure.

    1. Search jetty in the marketplace and create a web app service.


    2. Use git to clone the repository. You can find the link in "Properties".

    3. Place your .jar at someplace in the repository and edit web.config.

    change this:

                                 -jar "d:\home\site\wwwroot\bin\jetty-distribution-
    to this:

                                 -jar "d:\home\site\wwwroot\bin\start.jar"
    The server needs to set its port based on the argument. The b4j code:

    Sub AppStart (Args() As String)
    Dim port As Int
    End Sub
    4. Then use git push to make deployment.

    Here is an example: https://b4jserver.azurewebsites.net/hello

    Attached Files:

    Mashiane, tchart, thinktank and 11 others like this.
  2. tchart

    tchart Active Member Licensed User

    Hi xulihang, this looks awesome. Could you provide more details on how you do the git clone and jar replacement? I'm a bit stuck.
  3. xulihang

    xulihang Active Member Licensed User

    Get the DEPLOYMENT TRIGGER URL in Properties and you can clone it. It's like

    You can see or set your own credentials in development center.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice