<config lang="json">
{
    "name": "Untitled App",
    "type": "web-worker",
    "tags": [],
    "ui": "",
    "version": "0.1.0",
    "cover": "",
    "description": "[TODO: describe this app with one sentence.]",
    "icon": "extension",
    "api_version": "0.1.8",
    "requirements": ["https://cdn.jsdelivr.net/npm/hypha-rpc@latest/dist/hypha-rpc-websocket.min.js"],
    "dependencies": []
}
</config>

<script lang="javascript">
class HyphaApp {
    async setup() {
        const serverConfig = await api.getServerConfig()
        const server = await hyphaWebsocketClient.connectToServer(serverConfig)
        // now you can use the server object to interact with the server
        await api.alert(await server.echo("Hello World!"))
        
        await server.disconnect()
    }
}

api.export(new HyphaApp())
</script>
    