A backend service to provide data to the Plant Ma app.
The app currently uses Google Sheets as its data source and leverages the Google Sheets API.
The google sheet storing the recommendations data should have the following format:
name | light | difficulty | star signs |
---|---|---|---|
plant name |
light requirements |
care difficulty |
applicable star signs, comma-separated |
for example:
name | light | difficulty | star signs |
---|---|---|---|
example plant | low | hard | cancer,leo,virgo |
- Within Google account, activate google developer account
- In the Google Developer Console, create a new Service Account
- select "role"
Viewer
- select JSON access credentials
- select "role"
- Back in the Developer Console, select "Enable APIs & Services"
- select "Google Sheets"
- Open the Google Sheet that will be used to store the data
- Share the sheet with the email address of your new Service Account
You'll need to download a JSON file representing your access credentials. If not done during the initial steps above, it can be downloaded from the Google Developers Console > Service Accounts area.
Important: you'll need the Google Service Accounts credentials JSON file downloaded in the "Google Setup" section above. As this file contains sensitive data, do not commit to the source code of this project!
TK
Get on the target node version using your preferred NodeJS version manager (specificed in .nvmrc
):
$ nvm use
Install dependencies:
$ npm install
Start server:
$ npm start
- document build / creds process
- server logging
- query param whitelist
- error handling for data load failure
- benchmarking
- abstract out SHEET ID