-
Notifications
You must be signed in to change notification settings - Fork 3
Set Up
Within the directory /Jasper write the following to install all dependencies:
yarn install
To start the application run
-
yarn start
oradonis serve --dev
To run test if your code meets coding coventions
- run
yarn lint
-
Download the database file and place it under the
<App root directory>/database
folder. -
Make sure your
.env
has the following lines:
DB_CONNECTION=sqlite
DB_DATABASE=jasper_dev
- Run
adonis migration:run
to generate the tables. - Run
adonis migration:rollback
to purge the tables.
- Download the binaries and the command line tool and place them under
C:\Windows\System32
- Open a command line tool from the
<App root directory>/database
and runsqlite3 jasper_dev.db
- Save the following query in
datanase/
as populate.sql - Within the sqlite3 shell, run
.read populate.sql
. This will populate the database with some mock rooms whose schedules are hosted on the Outlook account.
values("0ASIS", "IC CONF OTT-235 Queen-Oasis CONF IC", 0, "East", "Contact IT Service Desk", 22, 42, 1, 1, 0, 1, 1, 0, 1,"PC has Video"," ","insertCalendarHere"),
("101A (E)", "IC CONF OTT-235 Queen101A CONF IC", 1, "East", "343-291-3070", 6, 7, 0, 0, 0, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("101B (E)", "IC CONF OTT-235 Queen101B CONF IC", 1, "East", "343-291-3069", 8, 8, 0, 0, 0, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("105A (E)", "IC CONF OTT-235 Queen105A CONF IC", 1, "East", "343-291-3083", 10, 26, 0, 0, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("145A (E)", "IC CONF OTT-235 Queen145A CONF IC", 1, "East", "343-291-3248", 6, 7, 0, 0, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("165A (W)", "IC CONF OTT-235 Queen165A CONF IC", 1, "West", "343-291-2536", 6, 7, 0, 0, 0, 1, 0, 1, 1," ","(Collaboration Room)","insertCalendarHere"),
("174A (W)", "IC CONF OTT-235 Queen174A CONF IC", 1, "West", "343-291-3723", 7, 9, 0, 0, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("199B (W)", "IC CONF OTT-235 Queen199B CONF IC", 1, "West", "343-291-2424", 10, 14, 1, 1, 0, 1, 0, 0, 1,"Smartboard"," ","insertCalendarHere"),
("199C (W)", "IC CONF OTT-235 Queen199C CONF IC", 1, "West", "Contact IT Service Desk", 9, 10, 0, 1, 0, 1, 1, 0, 1,"2 PCS, 2 LED Displays"," ","insertCalendarHere"),
("231A (E)", "IC CONF OTT-235 Queen231A CONF IC", 2, "East", "343-291-2994", 10, 14, 0, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("243A (E)", "IC CONF OTT-235 Queen243A CONF IC", 2, "East", "343-291-2738", 9, 17, 0, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("243C (E)", "IC CONF OTT-235 Queen243C CONF IC", 2, "East", "343-291-2736", 10, 20, 0, 1, 1, 1, 0, 0, 1,"Plasma, Writeable Wall"," ","insertCalendarHere"),
("255D (W)", "IC CONF OTT-235 Queen255D CONF IC", 2, "West", "343-291-2768", 8, 8, 0, 0, 0, 0, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("259A (W)", "IC CONF OTT-235 Queen259A CONF IC", 2, "West", "343-291-2776", 8, 9, 0, 1, 0, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("298B (W)", "IC CONF OTT-235 Queen298B CONF IC", 2, "West", "343-291-3040", 5, 5, 0, 0, 0, 1, 1, 0, 1,"LCD Smart TV","(Collaboration Room)","insertCalendarHere"),
("298C (W)", "IC CONF OTT-235 Queen298C CONF IC", 2, "West", "343-291-3041", 6, 10, 0, 0, 0, 1, 0, 0, 1,"TV"," ","insertCalendarHere"),
("299A (W)", "IC CONF OTT-235 Queen299A CONF IC", 2, "West", "343-291-1545", 12, 24, 0, 1, 0, 1, 0, 0, 1,"2 PCS, 2 Plasmas, Blueray"," ","insertCalendarHere"),
("331A (E)", "IC CONF OTT-235 Queen331A CONF IC", 3, "East", "343-291-6464", 12, 37, 1, 0, 0, 1, 1, 0, 1,"2 PCS, 2 Projectors, VOIP # 343-291-2205"," ","AQMkADAwATM3ZmYAZS0xZWQyLWU0ZDEtMDACLTAwCgBGAAADuaOGRiaWJUeLSSjCrWPpCwcAIgcoqDGsOEGJ8e9NcrEd7QAAAgEGAAAAIgcoqDGsOEGJ8e9NcrEd7QAAAg0oAAAA"),
("353A (W)", "IC CONF OTT-235 Queen353A CONF IC", 3, "West", "343-291-1409", 10, 25, 0, 1, 0, 1, 1, 0, 1,"LED Display"," ","insertCalendarHere"),
("398C (W)", "IC CONF OTT-235 Queen398C CONF IC", 3, "West", "343-291-1593", 6, 7, 1, 1, 0, 1, 0, 0, 1,"Smartboard"," ","insertCalendarHere"),
("398B (W)", "IC CONF OTT-235 Queen398B CONF IC", 3, "West", "343-291-1592", 7, 9, 1, 1, 0, 1, 0, 0, 1,"Projector, Smartboard"," ","insertCalendarHere"),
("399B (W)", "IC CONF OTT-235 Queen399B CONF IC", 3, "West", "343-291-1592", 4, 6, 0, 0, 1, 1, 0, 1, 1," "," ","AQMkADAwATM3ZmYAZS0xZWQyLWU0ZDEtMDACLTAwCgBGAAADuaOGRiaWJUeLSSjCrWPpCwcAIgcoqDGsOEGJ8e9NcrEd7QAAAgEGAAAAIgcoqDGsOEGJ8e9NcrEd7QAAAg0pAAAA"),
("3E Lobby", "IC CONF OTT-235 Queen-3E LOBBY CONF IC", 3, "East", "343-291-1402", 12, 28, 0, 1, 0, 1, 0, 0, 1,"2 PCS, 2 Smartboards"," ","insertCalendarHere"),
("3W Lobby", "IC CONF OTT-235 Queen-3W LOBBY CONF IC", 3, "West", "343-291-1596", 10, 27, 1, 1, 1, 1, 0, 1, 1," "," ","insertCalendarHere"),
("401A (E)", "IC CONF OTT-235 Queen401A CONF IC", 4, "East", "343-291-2076", 8, 10, 1, 0, 0, 1, 0, 1, 1," "," ","AQMkADAwATM3ZmYAZS0xZWQyLWU0ZDEtMDACLTAwCgBGAAADuaOGRiaWJUeLSSjCrWPpCwcAIgcoqDGsOEGJ8e9NcrEd7QAAAgEGAAAAIgcoqDGsOEGJ8e9NcrEd7QAAAg0qAAAA"),
("401B (E)", "IC CONF OTT-235 Queen401B CONF IC", 4, "East", "343-291-2077", 8, 18, 1, 1, 1, 1, 0, 1, 1," "," ","insertCalendarHere"),
("402A (E)", "IC CONF OTT-235 Queen402A CONF IC", 4, "East", "343-291-2078", 6, 8, 0, 1, 1, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("551A (W)", "IC CONF OTT-235 Queen402A CONF IC", 5, "West", "Contact IT Service Desk", 8, 12, 0, 1, 0, 1, 1, 0, 1,"2 PCS, Smartboard","(Multi-purpose room)","insertCalendarHere"),
("567A (W)", "IC CONF OTT-235 Queen567A CONF IC", 5, "West", "Contact CIO", 6, 11, 0, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("5W Lobby", "IC CONF OTT-235 Queen5WLOBBY CONF IC", 5, "West", "343-291-1860", 12, 27, 1, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("645C (E)", "IC CONF OTT-235 Queen645C CONF IC", 6, "East", "343-291-1866", 10, 16, 0, 1, 1, 1, 1, 0, 1,"Smartboard TV"," ","insertCalendarHere"),
("660F (W)", "IC CONF OTT-235 Queen660F CONF IC", 6, "West", "343-291-1240", 13, 14, 0, 1, 1, 1, 0, 0, 1,"12 PCS, Smartboard","(Training room)","insertCalendarHere"),
("7E Lobby", "IC CONF OTT-235 Queen-7E LOBBY CONF IC", 7, "East", "343-291-1861", 12, 30, 1, 1, 1, 1, 0, 1, 1," ","(Multi-purpose room)","insertCalendarHere"),
("7W Lobby", "IC CONF OTT-235 Queen-7W LOBBY CONF IC", 7, "West", "343-291-1862", 12, 28, 1, 1, 1, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("741F (E)", "IC CONF OTT-235 Queen741F CONF IC", 7, "East", "343-291-1881", 10, 10, 0, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("752A (E)", "IC CONF OTT-235 Queen752A CONF IC", 7, "East", "343-291-3188", 16, 16, 0, 0, 1, 0, 0, 0, 0," "," ","insertCalendarHere"),
("799A (W)", "IC CONF OTT-235 Queen799A CONF IC", 7, "West", "343-291-3544", 10, 31, 0, 0, 1, 1, 0, 1, 1," "," ","insertCalendarHere"),
("831D (E)", "IC CONF OTT-235 Queen831D CONF IC", 8, "East", "343-291-2322", 8, 9, 0, 1, 0, 1, 0, 1, 1," "," ","insertCalendarHere"),
("902A (E)", "IC CONF OTT-235 Queen902A CONF IC", 9, "East", "343-291-1868", 8, 12, 0, 1, 1, 1, 0, 1, 1," "," ","insertCalendarHere"),
("903A (E)", "IC CONF OTT-235 Queen903A CONF IC", 9, "East", "343-291-1851", 6, 8, 0, 0, 0, 1, 0, 0, 1,"Smartboard"," ","insertCalendarHere"),
("903B (E)", "IC CONF OTT-235 Queen903B CONF IC", 9, "East", "343-291-1852", 10, 15, 0, 1, 1, 1, 0, 0, 1,"Plasma"," ","insertCalendarHere"),
("921D (E)", "IC CONF OTT-235 Queen921D CONF IC", 9, "East", "343-291-2144", 6, 9, 0, 1, 1, 1, 0, 1, 1," "," ","insertCalendarHere"),
("921E (E)", "IC CONF OTT-235 Queen921E CONF IC", 9, "East", "343-291-2151", 6, 12, 0, 1, 1, 4, 0, 1, 1," "," ","insertCalendarHere"),
("949A (E)", "IC CONF OTT-235 Queen949A CONF IC ", 9, "East", "Contact IT Service Desk", 22, 49, 1, 1, 1, 1, 1, 0, 1,"2 PCS, 2 Projectors"," ","insertCalendarHere")
- Go to extentions and download "ESLint"
- Type
yarn lint
- For in line use:
// eslint-disable-line
- For the whole file use:
eslint no-use-before-define: 0 */ // --> OFF
-
Download this script and put it in
database/
. To execute the script, within the sqlite3 shell, run.read room.sql
. This will populate the database with some mock rooms whose schedules are hosted on the Outlook account. -
Add these lines to the
.env
file:
MICROSOFT_APP_ID=292802e3-a198-4e18-ab66-8ea5e7968922
MICROSOFT_APP_PASSWORD=beguX64??cjmDDRVIJ676+!
MICROSOFT_REDIRECT_URI=http://localhost:3333/authorize
MICROSOFT_SCOPES=user.read calendars.readwrite openid profile offline_access
MICROSOFT_HOST=https://login.microsoftonline.com
MICROSOFT_AUTHORIZE_ENDPOINT=common/oauth2/v2.0/authorize
MICROSOFT_TOKEN_ENDPOINT=common/oauth2/v2.0/token
-
To get access token from the Outlook account, go to
http://localhost:3333/authenticate
where you will be prompted to login. Use the following credentials (You will only have to do this once. The application will refresh the access token every half hour as long as it is running):- Username: cdhj_rooms@outlook.com
- Password: TheJarvis
-
You may log into Outlook using the above credentials view the schedules(calendars) of mock rooms.