package RAMPServer;

import io.undertow.Undertow;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.util.Headers;

public class RAMPServer {
    public static void main(final String[] args) {

        // Use port 8080 if $PORT is not set.
        int port = 8080;
        if (System.getenv("PORT") != null) {
            port = Integer.valueOf(System.getenv("PORT"));
        }

        // Build and start the Undertow server.
        Undertow server = Undertow.builder()
                .addListener(port, "0.0.0.0")
                .setHandler(new HttpHandler() {
                    @Override
                    public void handleRequest(final HttpServerExchange exchange) throws Exception {
                        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain");
                        exchange.getResponseSender().send("Hello World");
                    }
                }).build();
        server.start();

        System.out.println();
        System.out.println("Started server at http://localhost:" + port + "/. Hit ^C to stop.");
    }
}
@@ -43,16 +43,49 @@
 dertow;%0A
+import io.undertow.util.Headers;%0A
 import i
@@ -180,28 +180,530 @@
 ndertow.
-util.Headers
+server.handlers.resource.ClassPathResourceManager;%0Aimport io.undertow.websockets.core.AbstractReceiveListener;%0Aimport io.undertow.websockets.core.BufferedTextMessage;%0Aimport io.undertow.websockets.core.WebSocketChannel;%0Aimport io.undertow.websockets.core.WebSockets;%0Aimport io.undertow.websockets.WebSocketConnectionCallback;%0Aimport io.undertow.websockets.spi.WebSocketHttpExchange;%0A%0Aimport static io.undertow.Handlers.path;%0Aimport static io.undertow.Handlers.resource;%0Aimport static io.undertow.Handlers.websocket
 ;%0A%0Apubli
@@ -774,17 +774,16 @@
 args) %7B%0A
-%0A
         
@@ -1127,16 +1127,864 @@
 Handler(
+path()%0A                        .addPrefixPath(%22/%22, websocket(new WebSocketConnectionCallback() %7B%0A                            @Override%0A                            public void onConnect(WebSocketHttpExchange exchange, WebSocketChannel channel) %7B%0A                                channel.getReceiveSetter().set(new AbstractReceiveListener() %7B%0A%0A                                    @Override%0A                                    protected void onFullTextMessage(WebSocketChannel channel, BufferedTextMessage message) %7B%0A                                        WebSockets.sendText(message.getData(), channel, null);%0A                                    %7D%0A                                %7D);%0A                                channel.resumeReceives();%0A                            %7D%0A                        %7D))%0A                        .addPrefixPath(%22/status%22, 
 new Http
@@ -1991,24 +1991,27 @@
 Handler() %7B%0A
+%0A  
             
@@ -2010,32 +2010,38 @@
                 
+      
 @Override%0A      
@@ -2026,32 +2026,40 @@
       @Override%0A
+        
                 
@@ -2158,32 +2158,40 @@
                 
+  
+      
 exchange.getResp
@@ -2261,32 +2261,40 @@
                 
+        
 exchange.getResp
@@ -2316,19 +2316,10 @@
 nd(%22
-Hello World
+OK
 %22);%0A
@@ -2330,34 +2330,47 @@
                 
+   
-%7D%0A
+     %7D%0A     
                 
@@ -2369,18 +2369,47 @@
         
-%7D)
+   %7D))%0A                        
 .build()
@@ -2547,22 +2547,28 @@
 %22/. 
-Hit %5E
+Press Ctrl+
 C to 
-stop
+exit
 .%22);

Add a simple websockets server.