General Question: What do you use for SPA JS pages...
# suitescript
r
General Question: What do you use for SPA JS pages? Do you use any npm based wrappers for the rest or do you use suitlets to get around cors... Do you use angular, vue, etc? I would like to here what others are using.
m
Usually Vue.js in an suitelet iframe with a restlet for backend API. You can do dev on your local machine using TBA for restlet, and then use the same restlet as a backend within NetSuite using users session. No CORS issues because it's all the same domain.
r
Thx for the help Michoel
I have a SPA loading in a suitely iframe now, thx for pointing me in the direction. the create-spa-netsuite looks like it is gone now so I am having to build the scaffolding by hand slowly.
m
Yeah unfortunately the author made it private.
r
Im trying to find a good oauth example for inside my JS that doesnt require node.js so I can call restlet from dev then Ill call via session on prod
michoel, on my dev server I am building oauth and using axios. but becuase it is local I am throwing a CORS error. "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https:// <myAccount> .restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=854&amp;deploy=1."
how are you avoiding cors on a axios call in the browser from your local?