Skip to content
Tinspin edited this page Jun 18, 2021 · 6 revisions

Prerequisites: You need a JDK and Ant installed on your computer and added to the path. Also you might need to add JAVA_HOME and ANT_HOME environment variables.


local

Download the page application, together with the latest rupy and extract them to the same folder. Go to the http/ folder first and start rupy with either the run.bat or run.sh script depending on your OS. Then go to the page/ folder and run the ant local task, this should build and deploy the test application to your rupy server. Now try browsing to http://localhost:8000.


remote

If you want to deploy to host.rupy.se you can follow the local tutorial above with these changes:

  1. You need to edit the page/build.xml script with your domain and the password given to you when you register at host.rupy.se.
  2. You should run ant remote instead of ant local.

We have started the development of sprout, a simple blogger; based on top of rupy and memory. If you want a real-world example of rupy in action try this out!


Let's create a rootservice (when you browse to "/") that returns 'hello'.

import se.rupy.http.*;
public class Hello extends Service {
	public String path() { return "/"; }
	public void filter(Event event) throws Event, Exception {
		event.output().print("hello");
	}
}

Compile the Hello class above and put it in a jar file (hello.jar in the example below), then upload it to a running rupy server (run.bat or run.sh) in your ant script like this:

<target name="deploy">
	<java fork="yes" classname="se.rupy.http.Deploy" classpath="http.jar">
		<arg line="localhost:8000"/>
		<arg line="hello.jar"/>
		<arg line="secret"/><!-- see run.bat and run.sh -->
	</java>
</target>
Clone this wiki locally