sensorCommunityAPI/src/main/java/sh/adb/sensorCommunityAPI/Main.java
2021-03-03 12:44:28 +01:00

20 lines
589 B
Java

package sh.adb.sensorCommunityAPI;
import org.json.simple.JSONObject;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
DataStore store = new DataStore();
JSONObject config = store.readJSON("config.json");
if (config == null) config = store.readJSON("example.config.json");
DataStoreBot bot = new DataStoreBot(
config.get("storePath").toString(),
config.get("apiURL").toString()
);
bot.setInterval((int)(long) config.get("interval"));
}
}