0

I wanted to check if somebody has explored the option of deploying Kitura compiled project on TomCat? Basically, is it possible to deploy the build outside IBM cloud environment?

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Abhinav
  • 37,684
  • 43
  • 191
  • 309

1 Answers1

2

Please note that you can run Kitura instead of Tomcat. Kitura is an embedded web server, you do not need other web server to run a Kitura application. So you can build a Kitura application on macOS/Linux and run the compiled executable on macOS/Linux. It will listen to the port you specify, receive HTTP requests and route them to the request handling code of your application.

Vadim Eisenberg
  • 3,337
  • 1
  • 18
  • 14
  • Right. But how can I deploy this application in a central server which is accessible via network not with local host port. – Abhinav Jan 07 '17 at 06:36
  • You can just run a Kitura application on a macOS/Linux machine and it will listen to a port of the machine. Then you can access this machine thru its IP address or its URL, with the port Kitura runs on. That's all. – Vadim Eisenberg Jan 07 '17 at 07:00
  • Suppose the URL of your macOS/Linux machine is `www.example.com`. Then you can run Kitura in that machine and let it listen, for example, on port 8090. Then you can access your Kitura app by URL `http://www.example.com:8090`. – Vadim Eisenberg Jan 07 '17 at 07:02
  • To clarify more - when you perform `swift build`, an executable file with Kitura application is produced in `.build/debug/`. Then you can just run this executable in a command line on your machine, no need to perform any special deployment. – Vadim Eisenberg Jan 07 '17 at 08:45
  • As @VadimEisenberg says, also you can swift build -c release for when you want to run this under real workloads and run your app with .build/release/ – Lloyd Roseblade Jan 18 '17 at 06:08