1 # XDS - X(cross) Development System Server
3 XDS-server is a web server that allows user to remotely cross build applications.
5 The first goal is to provide a multi-platform cross development tool with
6 near-zero installation.
7 The second goals is to keep application sources locally (on user's machine) to
8 make it compatible with existing IT policies (e.g. corporate backup or SCM).
10 This powerful webserver (written in [Go](https://golang.org)) exposes a REST
11 interface over HTTP and also provides a Web dashboard to configure projects and execute only _(for now)_ basics commands.
13 XDS-server also uses [Syncthing](https://syncthing.net/) tool to synchronize
14 projects files from user machine to build server machine or container.
16 > **NOTE**: For now, only Syncthing sharing method is supported to synchronize
19 > **SEE ALSO**: [xds-make](https://github.com/iotbzh/xds-make), a wrapper on `make`
20 command that allows you to build your application from command-line through
28 - Install and setup [Go](https://golang.org/doc/install) version 1.7 or
29 higher to compile this tool.
30 - Install [npm](https://www.npmjs.com/) : `sudo apt install npm`
31 - Install [gulp](http://gulpjs.com/) : `sudo npm install -g gulp-cli`
36 Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
38 mkdir -p $GOPATH/src/github.com/iotbzh
39 cd $GOPATH/src/github.com/iotbzh
40 git clone https://github.com/iotbzh/xds-server.git
45 And to install xds-server in /usr/local/bin:
54 xds-server configuration is driven by a JSON config file (`config.json`).
56 Here is the logic to determine which `config.json` file will be used:
57 1. from command line option: `--config myConfig.json`
58 2. `$HOME/.xds/config.json` file
59 3. `<current dir>/config.json` file
60 4. `<xds-server executable dir>/config.json` file
62 Supported fields in configuration file are:
65 "webAppDir": "location of client dashboard (default: webapp/dist)",
66 "shareRootDir": "root directory where projects will be copied",
67 "logsDir": "directory to store logs (eg. syncthing output)",
69 "binDir": "syncthing binaries directory (default: executable directory)",
70 "home": "syncthing home directory (usually .../syncthing-config)",
71 "gui-address": "syncthing gui url (default http://localhost:8384)"
76 >**NOTE:** environment variables are supported by using `${MY_VAR}` syntax.
80 Use `xds-start-server.sh` script to start all requested tools
82 /usr/local/bin/xds-start-server.sh
85 >**NOTE** you can define some environment variables to setup for example
86 config file `XDS_CONFFILE` or change logs directory `LOGDIR`.
87 See head section of `xds-start-server.sh` file to see all configurable variables.
92 ### XDS server architecture
94 The server part is written in *Go* and web app / dashboard (client part) in
99 +-- bin/ where xds-server binary file will be built
101 +-- config.json.in example of config.json file
103 +-- glide.yaml Go package dependency file
105 +-- lib/ sources of server part (Go)
107 +-- main.go main entry point of of Web server (Go)
109 +-- Makefile makefile including
111 +-- README.md this readme
113 +-- scripts/ hold various scripts used for installation or startup
115 +-- tools/ temporary directory to hold development tools (like glide)
117 +-- vendor/ temporary directory to hold Go dependencies packages
119 +-- webapp/ source client dashboard (Angular2 app)
122 Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
126 - replace makefile by build.go to make Windows build support easier
128 - add more documentation