Merge branch 'master' of github.com:velaboratory/VEL-Connect
commit
6053808218
|
|
@ -14,3 +14,4 @@ velconnect.db
|
||||||
velconnect*.db
|
velconnect*.db
|
||||||
.idea/
|
.idea/
|
||||||
velconnect/data/
|
velconnect/data/
|
||||||
|
*.db.bak
|
||||||
27
README.md
27
README.md
|
|
@ -1,11 +1,38 @@
|
||||||
## VELConnect API Setup
|
## VELConnect API Setup
|
||||||
|
|
||||||
|
### Option 1: Pull from Docker Hub:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 80:80 velaboratory/velconnect
|
||||||
|
```
|
||||||
|
and visit http://localhost in your browser.
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -p 8000:80 --name web velaboratory/velconnect
|
||||||
|
```
|
||||||
|
to access from http://localhost:8000 in your browser and name the container "web".
|
||||||
|
|
||||||
|
### Option 2: Build Docker Image:
|
||||||
|
|
||||||
|
Make sure you're in the `velconnect/` folder.
|
||||||
|
```
|
||||||
|
docker build --tag velconnect .
|
||||||
|
docker rm web
|
||||||
|
docker run -p 80:80 --name web velconnect
|
||||||
|
```
|
||||||
|
|
||||||
|
or run `./rebuild.sh`
|
||||||
|
|
||||||
|
### Option 3: Run Python locally (WSL or native Linux)
|
||||||
1. `cd velconnect`
|
1. `cd velconnect`
|
||||||
2. Create pip env: `python3 -m venv env`
|
2. Create pip env: `python3 -m venv env`
|
||||||
3. Activate the env `. env/bin/activate`
|
3. Activate the env `. env/bin/activate`
|
||||||
4. Install packages `pip install -r requirements.txt`
|
4. Install packages `pip install -r requirements.txt`
|
||||||
5. Add `config_mysql.py`
|
5. Add `config_mysql.py`
|
||||||
- Get from some old server
|
- Get from some old server
|
||||||
|
- Or copy and fill out the values from `config_mysql_template.py`
|
||||||
6. Run `./run_server.sh`
|
6. Run `./run_server.sh`
|
||||||
- Or set up systemctl service:
|
- Or set up systemctl service:
|
||||||
```ini
|
```ini
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ namespace VELConnect
|
||||||
foreach (KeyValuePair<string, string> elem in state.device.data)
|
foreach (KeyValuePair<string, string> elem in state.device.data)
|
||||||
{
|
{
|
||||||
string oldValue = null;
|
string oldValue = null;
|
||||||
lastState?.device.data.TryGetValue(elem.Key, out oldValue);
|
lastState?.device?.data?.TryGetValue(elem.Key, out oldValue);
|
||||||
if (elem.Value != oldValue)
|
if (elem.Value != oldValue)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "edu.uga.engr.vel.vel-connect",
|
"name": "edu.uga.engr.vel.vel-connect",
|
||||||
"displayName": "VEL-Connect",
|
"displayName": "VEL-Connect",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"unity": "2019.1",
|
"unity": "2019.1",
|
||||||
"description": "Web-based configuration for VR applications",
|
"description": "Web-based configuration for VR applications",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
MYSQL_DATABASE_DB = ''
|
||||||
|
MYSQL_DATABASE_USER = ''
|
||||||
|
MYSQL_DATABASE_HOST = ''
|
||||||
|
MYSQL_DATABASE_PASSWORD = ''
|
||||||
Loading…
Reference in New Issue