-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Last updated: Jan 2, 2020
A Note To Current Users of restaf: As time permits recommend you switch to this scoped version. New features will be added to the scoped versions described here. However we will continue to fix any issues that arise in the current non-scoped version of restaf.
The code is the gen2 branch. Currently leaving the master branch untouched until I am sure there are no breaking changes in this branch.
Please see the table of contents.
1: nodejs
let restaf = require('@sassoftware/restaf');
2: Browser
<script src="https://unpkg.com/@sassoftware/restaf/dist/restaf.min.js"></script>
1: nodejs
let restaflib = require('@sassoftware/restaflib');
2: browser
<script src="https://unpkg.com/@sassoftware/restaf/dist/restaf.min.js"></script>
- restafuilib - Examples of ui components based on react,material-ui and restaf
- examples - Examples showing the use of restaf and restaflib for writing nodejs programs
- uidemos - Examples of web apps using restaf, restaflib and uilibrary
- serverless-score - Scoring using AWS serverless functionality
- registerclient - create clientid and client secrets
- viyacaddy - upload tables, score code and astore to cas
- vaBasedApps - example of using restaf in SAS Visual Analytics web content and Data Driven Content components
1: The main package.json has scripts to build and run code in the packages.
2: To access SAS Viya you need to establish the following clientids. You can use the interactive utility registerclient to create these(or use your favorite script)
-
A password flow clientid(raf) and clientsecret(raf) to run the samples in the packages/examples directory and for packages/viyacaddy.
-
An implicit flow clientid(callback) with a redirect(http://localhost:8080/callback) to run the samples in packages/uidemos. Make sure you have set the CORS values appropriately using SAS Environment Manager.
3: Some of the examples need data to be loaded into the SAS Viya Server. The sample data is the the data subdirectory. Use the viyacaddy to upload these into your Viya Server(or use SAS Studio if that is your preferred mode of operation).
1: Edit packages/examples/env/restaf.env and set the value indicated there. Note that you have the option of setting these values thru your system SET /EXPORT commands.If you prefer the latter leave the fields as name= in the env file.
2: To run a test example use this command
npm test testname
Example:
npm test casEcho
After creating the clientid 'callback' do the following:
set VIYA_SERVER=<your viya server: ex http://acme.com/viya>
npm run uidemos:implicit
And then visit the url indicated in the log( http://localhost:8080/viyaapp)
Run the following script
set VIYA_SERVER=<your viya server: ex http://acme.com/viya>
npm run registerclient
To get started enter 'logon' and answer the prompts.
Once successfully logged on issue the appropiate commands (issue help to see the available commands).
Run the following script
set VIYA_SERVER=<your viya server: ex http://acme.com/viya>
npm run viyacaddy
To get started enter 'logon' and answer the prompts.
Once successfully logged on issue the appropiate commands (issue help to see the available commands).
.... Under construction...
-
restaf
-
restaflib
-
Examples:
- Cas Server
- Compute Server
- Scoring with MAS
- Scoring with CAS
- Utility
-
CAS Related Functions
-
MAS Related Functions
-
Compute Server Related Functions
-
Reports Related Functions
-
Interactive CLI
-
Special Topic