Enhance the "getting started" docs a little more

Đang mở
#521 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@RettBehrens đang làm issue này rồi.

Từ ngày 15/4/2021.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Priority: Low Status: Accepted Type: Documentation

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

Ngôn ngữ chính
TypeScript
Star
264
Fork
177
Merge trung bình
10 giờ 5 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của XeroAPI/xero-node

Tất cả issue của XeroAPI/xero-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.