How to host a tiny RESTful application written in Java/C#/Py

I want to write a tiny RESTful server in some language that can run on Ubuntu 10.04, but I have no idea how to host it.

Currently I have a node with nginx, I might have Apache running as well but not configured correctly, running that serves some public websites (Wordpress).

Does that mean port 80 is taken? How should I host my application to be able to handle urls like http://myip/User/Zolomon for instance?

Do I have to communicate with nginx in some way, since I suppose it's what handles the URL?

1 Reply

You'd normally use nginx to proxy the requests to your application, and your application would listen with a FastCGI or HTTP server bound to some arbitrary port on a loopback IP (::1 or 127.0.0.1). Conceptually, it's the same as how nginx is handling Wordpress.

Since your application wouldn't otherwise care about FastCGI or HTTP, many things exist to make your application web-aware without you having to become web-aware. For Java, I've used Tomcat and Jetty; for Python, I've used flup and gunicorn. Dunno about C#.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct