Firstly, you need to install the packages that is required for the server to run.
npm install
To start the development server with debug enabled:
DEBUG=*:server node ./bin/www
Currently, any requests made to your local server is then made on the existing DocumentDB server already hosted on Azure. In production, the server will also be hosted onto Azure (I think).
From the root of the repository:
git subtree push --prefix src/server azure master
Make sure you set an 'application/json' header!!
In our system, every VSTS Account has it's own document, so if a VSTS account hasn't used the extension before you will have to create a Document for that account using this API call. IMPORTANT: Make sure the accountID you use to create this is the account-id of the VSTS account!!
Make a GET request on
localhost:3000/document/create/:documentId
For example:
localhost:3000/document/create/sajdhjqwe-id-2
At the moment this is a GET request, and is subject to change, though is a low priority
create a POST request on
``` localhost:3000/:documentId/meeting/create ```For example:
``` localhost:3000/ProperTestDocument/meeting/create/EatingChocolate ```The body of the POST request is as follows:
``` { "meetingName": "Happy Birthday To the Ground!", "hostId": "123456789"", "hostAvailability": [ { "dateStart": 1, "dateEnd": 1 } ], "attendees": [ { "id": "118118118", "name": "Kelvin Chan" } ] } ```Make a GET request on
``` 'localhost:3000/:documentId/meeting/get/:userId' ```Alternatively, you can get all hosted meetings of a user with the request below
``` localhost:3000/:documentId/meeting/hosted/:userId ```UPDATE: working now.
Make a POST request on:
``` localhost:3000/:documentId/:meetingId/attendees/add ```For example
``` localhost:3000/my-document-id/my-meeting-id/attendees/add ```The POST body is as follows:
``` { "attendees": [ { "id": "user-id-here", "response": 0, "name": "user's name here", "availableTimes":[ { "dateStart": "some-date-object/string here", "dateEnd": "some-date-object/string here" } ] } ] } ```
Make a GET request on:
``` localhost:3000/my-document-id/meeting-id/get ``` For example: ``` localhost:3000/ProperTestDocument/DdVqhdEV5gVuj/get ```Make a POST request on:
``` localhost:3000/ProperTestDocument/14AjFg56Z86H8/edit ```POST body is as follows:
``` { "hostId": "new host id mofo!!", "meetingName": "What is this", "meetingLocation": "Some where in the world", "hostAvailability": [], "finalDate": null, "attendees": [] } ```You can include as little or as many parameters as you want. You cannot replace meetingID, you can try but it won't work.
POST request. No body needed for now, but I've made it a post request because we'll eventually have to attach auth headers for the server
``` localhost:3000/ProperTestDocument/meeting/responded/user-id ```POST request.
``` localhost:3000/ProperTestDocument/meeting/unresponded/user-id ```