- cd /webs/IODD
- git pull
- Inspect /webs/IODD/client3/c32_home-wi-mysql-api -env file for correctness
- Inspect /webs/IODD/server3/s31_iodd-data-api/api .env file for correctness
Client1 Home Apps
-
Brilliant work by Rick
Server1 getJSON Tool
-
A Node script to extract data from MySQL DB. See .env for parameters.
1. Install Server1 node_modules `$ cd server1 ` `$ npm install ` 2. Configure MySQL extraction parameters `$ cd 1s1* ` `$ nano .env ` - DBNAME, DBHOST, DBUSER, DBPASS = database connection parameters - DBSQL1-n=SELECT * FROM ... statements will be joined together into one db.json file - RENAME_EM=false will add a timestamp to the saved db.json and db.json.js - RENAME_EM=true will save the current file with a timestamp 3. Run the extraction program `$ npm run getJSON ` 4. Copy the extracted db.json files to their data locaton - Remove the timestamp _vYMMDD.HHMM if necessary - Copy the file, db.json.js, into ./client1/home/assets/json for use by the Client1 App
Server2 JSON Server APIs
-
A simple API that returns data using json-server with a db.json file.
1. Install Server2 node_modules `$ cd server2 ` `$ npm install ` 2. Extract db.json from MySQL - Use the Server1 getJSON Tool described above if necessary - Copy the file, db.json, into ./server2/api/models for use by the JSON Server API 3. Run and test the JSON Server APIs `$ cd server2 ` `$ cd 1s2* ` `$ npm start ` - Open the file, testAPIs.html, in Live Server
Server3 MySQL Server APIs
-
Returns data requested viawith an API call.
Client React Admin Apps
-
A React client app to view data in the World database.
-
A React client app to authenticate users in the RAuth table.
-
A React client app to view, add, edit or delete users in the RAuth table
-
A React client app to view, add, edit or delete data in the World database
Server MySQL APIs
-
A React server api to view data in the World database.
-
A React server api to authenticate users in the RAuth table.
-
A React server api to view, add, edit or delete users in the RAuth table
-
A React server api to view, add, edit or delete data in the World database