Skip to content
/ angular-seed-app Public template

Angular seed app for SASjs

Notifications You must be signed in to change notification settings

sasjs/angular-seed-app

Folders and files

NameName
Last commit message
Last commit date
Aug 8, 2023
Jun 15, 2022
Aug 4, 2022
Nov 6, 2023
Nov 6, 2023
Mar 15, 2022
Mar 14, 2022
Sep 29, 2021
Mar 24, 2022
Jul 21, 2022
Mar 15, 2022
Aug 4, 2022
Sep 21, 2023
Jul 15, 2020
Nov 6, 2023
May 10, 2023
Jul 9, 2020
Jul 7, 2023
Sep 21, 2023
Sep 21, 2023
Jul 9, 2020
May 10, 2023
May 10, 2023
Jul 25, 2021

Repository files navigation

Overview

All Contributors

This seed app provides a quick start for building an Angular Web app on Viya, SAS EBI or Foundation SAS with the SASjs DevOps framework.

Frontend Web

Clone the repo, cd into it, and npm install.

Next, update the following attributes in index.html:

  • appLoc - this is the folder (eg in metadata or SAS Drive) under which the SAS services are created.
  • serverType - either SAS9, SASVIYA or SASJS.
  • serverUrl - only relevant if not serving from the SAS domain (!SASCONFIG/LevX/Web/WebServer/htdocs in SAS9 or /var/www/html on SAS Viya)
  • useComputeApi - can be true or false, it's a switch for SASjs adapter whether to use Compute approach while doing requests.
  • contextName - only relevant if useComputeApi is true. Provides a context name that will be used in adapter.
  • LoginMechanism - either Default or Redirected. See SAS Logon section.
  • requestHistoryLimit - Request history limit. Increasing this limit may affect browser performance, especially with debug (logs) enabled. Default is 10.
  • debug - if true then SAS Logs and extra debug information is returned.

More details in official @SASjs/adapter documentation: https://sasjs.io/sasjs-adapter/#configuration

If you are running locally you will either need to whitelist localhost on the server, or enable CORS as described here

Backend Services

Normally services would be compiled and deployed using the SASjs CLI, however for speedy setup you can simply run the following code in Studio:

%let appLoc=/Public/app/angular;  /* Root folder in Metadata or Drive */
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;  /* download and compile macro core library */
filename ft15f001 temp;
parmcards4;
    proc sql;
    create table areas as select distinct area from sashelp.springs;
    %webout(OPEN)
    %webout(OBJ,areas)
    %webout(CLOSE)
;;;;
%mx_createwebservice(path=&appLoc/services/common, name=appinit)
parmcards4;
    %webout(FETCH)
    proc sql;
    create table springs as select * from sashelp.springs
      where area in (select area from areas);
    %webout(OPEN)
    %webout(OBJ,springs)
    %webout(CLOSE)
;;;;
%mx_createwebservice(path=&appLoc/services/common, name=getdata)

To use the CLI, first run sasjs add and follow the prompts to create a target. You can then run sasjs cbd -t yourtargetname to compile, build, and deploy your backend.

If you set streamWeb:true in the streamConfig of your sasjs/sasjsconfig.json file you can also run as a streaming app (without a web server).

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Allan Bowe
Allan Bowe

πŸ’» ⚠️ πŸ‘€ πŸ“Ή πŸ“–
Yury Shkoda
Yury Shkoda

πŸ’» ⚠️ πŸ“† πŸ“Ή πŸ“–
Krishna Acondy
Krishna Acondy

πŸ’» ⚠️ πŸ‘€ πŸš‡ πŸ“¦ 🚧 πŸ–‹
Muhammad Saad
Muhammad Saad

πŸ’» ⚠️ πŸ‘€ πŸ§‘β€πŸ« πŸ“–
Sabir Hassan
Sabir Hassan

πŸ’» ⚠️ πŸ‘€ πŸ€”
Mihajlo Medjedovic
Mihajlo Medjedovic

πŸ’» ⚠️ πŸ‘€ πŸš‡
Vladislav Parhomchik
Vladislav Parhomchik

⚠️ πŸ‘€
Rud Faden
Rud Faden

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!