|
| 1 | +# SmartDeviceLink (SDL) |
| 2 | + |
| 3 | +SmartDeviceLink (SDL) is a way to connect applications on a smart phone to a vehicle so they can be controlled by a vehicle's head unit. There are three main pieces to SDL - [core](https://github.com/smartdevicelink/sdl_core) (head unit), [mobile libraries](https://github.com/smartdevicelink/sdl_android), and the [server](https://github.com/smartdevicelink/sdl_server). |
| 4 | + |
| 5 | +## SDL Server |
| 6 | + |
| 7 | +The SmartDeviceLink (SDL) server handles authentication, data collection, and basic configurations for SDL connected vehicles. In general these tasks are accomplished using JSON documents called [Policy Tables]() that are configured by the server and then downloaded by other SDL components. The server's backend API (written in node.js) handles these types of requests and can be easily extended to handle more. Configuration of Policy Tables, or any other data, can be done using the server's front-end GUI (written in Angular.js). Customization of the front-end with your own look and feel is encourage and worry-free because these changes will not affect the underlying functionality of the server. |
| 8 | + |
| 9 | +**tl;dr** |
| 10 | + |
| 11 | +Javascript backend and front-end used for authentication and data collection for SDL devices. |
| 12 | + |
| 13 | +## Current Status |
| 14 | + |
| 15 | +**Development:** SDL server is currently in development and not yet ready for production use. Please help us develop it by submitting your ideas and/or pull-requests. |
| 16 | + |
| 17 | +## Important Notices |
| 18 | +**Policy Table Format:** SDL Policy Tables have a very specific format that must be followed. The current code has not yet been tested with SDL [core](https://github.com/smartdevicelink/sdl_core) and therefore may have bugs related to the Policy Table format and/or data. Do **not** rely on the current Policy Table endpoint response values at this time. |
| 19 | + |
| 20 | +**Encrypted vs Plain Text:** SDL Policy Tables can be downloaded and transferred to SDL [core](https://github.com/smartdevicelink/sdl_core) in a proprietary format or as plain text. A proprietary format consist of symmetrically encrypted packets, to which only your SDL server and core hold the key. |
| 21 | + |
| 22 | +# Getting Started |
| 23 | +A quick guide to installing, configuring, and running an instance of the SDL server. |
| 24 | + |
| 25 | + 1. Install [Node.js](http://nodejs.org/) |
| 26 | + 2. Install or setup a [MongoDB](http://docs.mongodb.org/manual/installation/) Database. |
| 27 | + 4. Install the dependancies: `git`, `make`, and `g++` |
| 28 | + |
| 29 | + For Ubuntu: `sudo apt-get install git make g++` |
| 30 | + |
| 31 | + 3. Install Fox.js, a framework used to run the SDL server. |
| 32 | + |
| 33 | + npm -g install foxjs |
| 34 | + |
| 35 | + 4. Download and install a new instance of the SDL server. |
| 36 | + |
| 37 | + fox new MyServer sdl_auth_server |
| 38 | + |
| 39 | + The server is now started and you can view it by going to [localhost:3000](http://localhost:3000) in your browser. |
| 40 | + |
| 41 | + 5. Configure the server using the `/server/configs/config.js` file. As you save changes to the server's files it will automatically restart applying the changes. |
| 42 | + |
| 43 | + |
| 44 | +## Start Server |
| 45 | +A server can be started by issuing the start command from anywhere within the project folder. |
| 46 | + |
| 47 | + fox start |
| 48 | + |
| 49 | +By default the server will start in production mode. You can specify different node environments using CLI switches. |
| 50 | + |
| 51 | +* `-l`: **Local** mode starts the server using nodemon at the IP address "localhost" using the local database. Debug mode is also enabled. |
| 52 | +* `-d`: **Development** mode starts the server using pm2 in a production like mode using a development database. Debug mode is also enabled. |
| 53 | +* `-p`: **Production** mode starts the server using pm2 in a production mode using the production database. Debug mode is disabled. |
| 54 | + |
| 55 | +So for example we can start the server in local mode: |
| 56 | + |
| 57 | + fox start -l |
0 commit comments