How to Deploy Serverless Java with our platform
We can deploy java apps easily into Nimbella Serverless Platform with these steps below:
- Code your business logic such that Java's main method consumes user requests as JSON object parameters.
- Process User Request in Java as per your business logic.
- Return the processed Response to the user as a JSON object.
- Wrap your java project as per Nimbella's directory structure recommendation for deployment.
- Configure the YAML file for deployment and deploy it through Nimbella's CLI.
Here’s an example of a typical directory structure of a serverless java maven project on Nimbella.
You can deploy your serverless Java code with us directly through our platform or also through a GitHub path.
If you are running the app through our console just type:
And if you want to deploy through a GitHub path the command is the following:
so as an example of deployment through GitHub the code would be:
nim project deploy github:nimbella/demo-projects/visits
nim project deploy email@example.com:/my-account/my-repo-with-project/#dev