Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions java/starter/src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.openruntimes.java.RuntimeContext;
import io.openruntimes.java.RuntimeOutput;
import java.util.HashMap;
import java.util.Map;
import io.appwrite.Client;

public class Main {
Expand All @@ -14,9 +15,9 @@ public RuntimeOutput main(RuntimeContext context) throws Exception {
//
// Client client = new Client();
// client
// .setEndpoint("https://cloud.appwrite.io/v1")
// .setProject(System.getenv("APPWRITE_FUNCTION_PROJECT_ID"))
// .setKey(System.getenv("APPWRITE_API_KEY"));
// .setEndpoint("https://cloud.appwrite.io/v1")
// .setProject(System.getenv("APPWRITE_FUNCTION_PROJECT_ID"))
// .setKey(System.getenv("APPWRITE_API_KEY"));

// You can log messages to the console
context.log("Hello, Logs!");
Expand All @@ -32,12 +33,12 @@ public RuntimeOutput main(RuntimeContext context) throws Exception {
}

Map<String, Object> json = new HashMap<>();
json.put("motto", "Build Fast. Scale Big. All in One Place.");
json.put("motto", "Build like a team of hundreds_");
json.put("learn", "https://appwrite.io/docs");
json.put("connect", "https://appwrite.io/discord");
json.put("getInspired", "https://builtwith.appwrite.io");

// `context.getRes().json()` is a handy helper for sending JSON
return context.getRes().json(json);
}
}
}