Formatting Readme

This commit is contained in:
Patrick McDonagh
2016-02-01 20:57:17 -06:00
parent 11c2d601f1
commit 27d1501cd5

View File

@@ -19,67 +19,67 @@ npm install -g forever
## Installation
1. Clone this repository using either HTTPS:
```
git clone https://patrickjmcd@bitbucket.org/patrickjmcd/tagserver.git
```
or SSH:
```
git clone git@bitbucket.org:patrickjmcd/tagserver.git
```
```
git clone https://patrickjmcd@bitbucket.org/patrickjmcd/tagserver.git
```
or SSH:
```
git clone git@bitbucket.org:patrickjmcd/tagserver.git
```
2. Create the necessary database file:
```
for MySQL run
mysql -u root -p < www/dbcreate_MySQL.sql
```
or
```
for SQLite run
sqlite3 /mnt/usb/data.db < www/dbcreate_SQLite.sql
```
```
for MySQL run
mysql -u root -p < www/dbcreate_MySQL.sql
```
or
```
for SQLite run
sqlite3 /mnt/usb/data.db < www/dbcreate_SQLite.sql
```
3. Install necessary npm packages
```
npm install
```
```
npm install
```
4. Install necessary bower packages
```
bower install
```
```
bower install
```
5. Create init.d scripts
```
INFO HERE COMING SOON
```
```
INFO HERE COMING SOON
```
6. Test Web Server functionality
```
node www/app.js
```
Proceed to http://<IP OF POConsole>:3000 to test the web server and set up tags.
```
node www/app.js
```
Proceed to http://<IP OF POConsole>:3000 to test the web server and set up tags.
7. Enter tag information in web server.
8. Set IP of PLC in datalogger program. In python/tagserver_<DBTYPE>.py find the line that contains the variable
```
PLC_IP_ADDRESS = ...
```
enter the PLC IP Address in quotes behind the equals sign. THIS WILL SOON BE A WEB-CONFIGURED ITEM.
```
PLC_IP_ADDRESS = ...
```
enter the PLC IP Address in quotes behind the equals sign. THIS WILL SOON BE A WEB-CONFIGURED ITEM.
9. Test the Python datalogger functiality.
```
python python/tagserver_<dbtype>.py
```
The program should return messages saying it has stored values. If errors occur, check the PLC ip address. If errors persist, contact Henry Pump.
```
python python/tagserver_<dbtype>.py
```
The program should return messages saying it has stored values. If errors occur, check the PLC ip address. If errors persist, contact Henry Pump.
10. Start the init.d scripts so the programs run in the background.
```
/etc/int.d/tagserver start
```
and
```
/etc/init.d/website start
OR
forever www/app.js
```
```
/etc/int.d/tagserver start
```
and
```
/etc/init.d/website start
OR
forever www/app.js
```