Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the "getting started" docs a little more #521

Open
PeteDuncanson opened this issue Apr 15, 2021 · 1 comment
Open

Enhance the "getting started" docs a little more #521

PeteDuncanson opened this issue Apr 15, 2021 · 1 comment
Assignees

Comments

@PeteDuncanson
Copy link

PeteDuncanson commented Apr 15, 2021

Describe the bug

Seems the readme is missing some of the usual simple things I would expect for getting started, they can but found but it makes you have to go look for them.

How to install

I think these are both right but feel free to check/change:
`
npm install xero-node -D

yarn add xero-node
`

Include require statements in all demo code

Can we include the right import/require statements somewhere, had to do some guess work to find it:

const { XeroClient } = require("xero-node");

This won't work with SPA as we don't support it

I tried to use this in my SPA but its using loads of node only goodies so it failed. I then used it to as a crib sheet to try to make my own thin client to get it working (I only needed two API endpoints). But this fell down due to CORS errors/restrictions when got to actually trying to do the API calls (the OAuth stuff doesn't have this problem so lead me on a bit of a false start). Would really be worth a bit about the lack of CORS support and how a proxy or Lambda would be needed to do the heavy lifting instead. Would have saved me a day of swearing to know that up front.

All the above small bits of info would have saved me some time and head scratching, less friction so I can get to the good stuff quicker.

Cheers

Pete

@SerKnight
Copy link
Contributor

Note to also add AuthEventId and the logic of updateTenants to readme

#475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants