Skip to content

Setup of config.js

Yashar edited this page Feb 1, 2017 · 4 revisions

You will need to first setup your config.js file. An example template can be found in the src/js/config-example.js file. To configure the app to pull from your own Google Sheets, you'll need to copy and paste the example, renaming it to be config.js

##Summary of config.js values

Value Description Details
author Can be company, username, etc Info
spreadsheetId ID of spreadsheet to link to Info
sheetId Name of the first sheet (tab) Info
CLIENT_ID API Value Info
numberOfUsers Number of Users shown Info
isAuth Should not change Info

Details

author

The author name property can be anything you like. A company name, a user's name, etc.


spreadsheetId

The spreadsheetId can be found in the url when editing your spreadsheet. If you open the sheet from Google Apps, the url should be https://docs.google.com/spreadsheets/d/ID_HERE/edit with "ID_HERE" being the spreadsheet's ID.


sheetId

The sheetId is the name of the first tab of the sheet. If you are using our example spreadsheet file, you can leave this property's value as "Scheduler".


CLIENT_ID

  1. Point your browser to https://console.developers.google.com and create a new project for the resource tracker.

2. After creating the project, navigate to the Library tab and click on "Sheets API" under the Google Apps API column

3. After navigating to the Google Sheets API Dashboard, find the "Enable" button and click to enable access.

4. After the API has been enabled, navigate to the "Credentials" tab in the sidebar, and choose "OAuth consent screen". Choose your email address from the dropdown if it's not selected already and fill in the "Product name shown to users". The other fields are optional, so you can click save with the previous two filled out.

5. After saving the OAuth consent screen settings, back on the Credentials tab, choose "OAuth client ID" from the "Create credentials" dropdown.

6. Choose "Web application" from the Application type list and give your client ID a name. Add any and all URIs you plan to host the application at under Authorized JavaScript origins. In our example, we simply used "localhost". After adding all Authorized origins, click Create.

7. After successfully creating the ID, you should be presented with a modal that displays your client ID and a client secret. The client ID from the first field is what you need for the `spreadsheetId` property in the configuration.


numberOfUsers

This property takes a number value that controls the number of people you wish to show. "10" is our rough max suggestion.


isAuth

This property can be ignored and should be kept as false. The value will be changed upon authorizing with Google.

Clone this wiki locally