Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
How to build a SIB application from sources
#########################################
Requirements
============
npm 6.7.0
Configure the app
==================
Get the code of your app (for the example the SIB App):
.. code-block:: bash
git clone https://git.happy-dev.fr/startinblox/applications/sib-app.git /tmp/sib_app
cd /tmp/sib_app
Create JON file and configure the client to contact the servers:
.. code-block:: json
{
{
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"authority": "http://api.batman.happy-dev.fr/",
"clientName": "Sib App",
"authorityName": "batman",
"publicDirectory": false,
"endpoints": {
"circles": "https://api.batman.happy-dev.fr/circles/",
"users": "https://api.batman.happy-dev.fr/users/"
},
"analytics": []
}
The parameters are:
.. list-table::
:stub-columns: 1
* - xmpp
- authority
- authorityName
- clientName
- endpoints
* - the BOSH access of your Prosody's server
- the primary OpenID authority url, for sib-auth
- the primary OpenID authority name, for sib-auth
- your client name, for sib-auth
- api points to the server to contact for each capability
In this example we are contacting the same server (batman.happy-dev.fr) for all our application capabilities. Because we installed the server with this configuration we know it supports all capabilities we need. But we could point each capability to different servers as long as they support it.
If you use a local development server, you should use http://localhost:8000/ instead.
Build the client app
==================
Create your application bundle:
.. code-block:: bash
npm run build
The application bundle is in the dist folder, ready to be deployed everywhere as a static file.
You can serve your application locally (assuming you already have a SIB server setup) to check its behavior:
.. code-block:: bash
npm run watch