You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This React seed app provides a wrapper for `@sasjs/adapter`, a lightning fast adapter for talking to SAS - on Viya, EBI, or SASjs Server.
7
10
8
-
9
11
## Frontend Web
10
12
11
13
If you are running on SAS 9 you need to set `serverType` to SAS9 in `sasContext.tsx`.
@@ -18,14 +20,14 @@ If you are running locally you will also need to whitelist `localhost` on the se
18
20
19
21
## Backend Services
20
22
21
-
The best way to deploy SAS services is using the [SASjs CLI](https://cli.sasjs.io). Simply [install](https://cli.sasjs.io/installation/), update the `defaultTarget` attribute in the [sasjsconfig.json](https://github.com/sasjs/react-seed-app/blob/main/sasjs/sasjsconfig.json) file, and run the following commands:
23
+
The best way to deploy SAS services is using the [SASjs CLI](https://cli.sasjs.io). Simply [install](https://cli.sasjs.io/installation/), update the `defaultTarget` attribute in the [sasjsconfig.json](https://github.com/sasjs/react-seed-app/blob/main/sasjs/sasjsconfig.json) file, and run the following commands:
22
24
23
25
```bash
24
-
sasjs auth
26
+
sasjs auth
25
27
sasjs cbd
26
28
```
27
29
28
-
This will first authenticate to your target (follow the prompts) and after that you can just run `sasjs cbd` to rebuild and deploy your services. If you set `streamweb:true` in the sasjsconfig.json it will also deploy your frontend as a streaming app (no need for a web server).
30
+
This will first authenticate to your target (follow the prompts) and after that you can just run `sasjs cbd` to rebuild and deploy your services. If you set `streamweb:true` in the sasjsconfig.json it will also deploy your frontend as a streaming app (no need for a web server).
29
31
30
32
If you are just looking to build quickly and don't have time to install NPM then you can also create the web services on ANY version of SAS by running the code below.
31
33
@@ -60,6 +62,15 @@ This app will work on all versions of SAS Viya, in SAS 9 EBI from 9.3 and above,
60
62
61
63
It will not work on SAS University edition.
62
64
65
+
## Backend Services in JavaScript
66
+
67
+
If you are writing services in JS and your service depends on any third party library/package then you need to bundle that service before deploying it to sasjs server otherwise the service wouldn't work. You can choose any bundler for this process. One possible option could be `webpack`. And if you choose webpack then you can use it like:<br/>
In our case we have a mock service at path `sasjs/mocks/appinit.js` and we want to build and make it ready for deployment. So, we have to run following in terminal:<br/>
0 commit comments