TEMS DAS Backend in ExpressJS
Components
- Routing and Server: Express
- Frontend Framework: Vue (Not yet implemented)
- Object Relational Mapping: Sequelize
- API Queries: GraphQL
- Database: PostgreSQL
Installation.
Requires Nodejs, npm to be installed.
npm install
npm run start
Requires PostgreSQL server to be installed.
Change Postgres settings in ./config.js
This will be in the TEMS_DB
environment variable during production
Sample Graphql Query
Expand
{ getTesterByName(name:"GRONK2") { id Slots{ slotNumber Boards { boardId } Monitors { name } } Warnings { message } Faults { date } } }
Will return{ "data": { "getTesterByName": { "id": 1, "Slots": [ { "slotNumber": 1, "Boards": [ { "boardId": "0000-0000-0000" } ], "Monitors": [ { "name": "Heat" } ] } ], "Warnings": [ { "message": "Error!" } ], "Faults": [ { "date": "Wed Jul 11 2018 01:44:41 GMT-0400 (Eastern Daylight Time)" } ] } } }