/*
- * Copyright (C) 2016, 2017 "IoT.bzh"
+ * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
#include "afb-hswitch.h"
#include "afb-hreq.h"
#include "afb-apiset.h"
+#include "afb-api-ws.h"
#include "afb-session.h"
#include "afs-supervisor.h"
goto error;
}
+ /* export the service if required */
+ if (main_config->ws_server) {
+ rc = afb_api_ws_add_server(main_config->ws_server, main_apiset);
+ if (rc < 0) {
+ ERROR("Can't export (ws-server) api %s: %m", main_config->ws_server);
+ goto error;
+ }
+ }
+
/* start the services */
if (afb_apiset_start_all_services(main_apiset, 1) < 0)
goto error;
}
/**
- * initalize the supervision
+ * initialize the supervision
*/
int main(int ac, char **av)
{