1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-10 17:04:36 +00:00
Files
adapter/docs/index.html
2020-07-07 19:53:35 +01:00

131 lines
12 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>sasjs</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="assets/js/search.js" data-base=".">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<ul class="results-priority" style="display:none">
</ul>
<a href="index.html" class="title">sasjs</a>
&emsp;<a href="https://github.com/macropeople/sasjs" class="title">SASjs on Github</a>
&emsp;<a href="https://sasjs.io" class="title">SASjs.io</a>
&emsp;<a href="https://github.com/macropeople/sasjs-cli" class="title">SASjs CLI</a>
&emsp;<a href="https://github.com/macropeople/react-seed-app" class="title">React Seed App</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
</ul>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation outline primary">
<a style="margin-left:0em" href="globals.html">Globals</a>
<ul style="display:none">
{&quot;SAS Adapter&quot;:{&quot;SASjs&quot;:&quot;modules/sasjs&quot;,&quot;SASjsConfig&quot;:&quot;classes/sasjsconfig.sasjsconfig-1&quot;,&quot;ServerType&quot;:&quot;enums/servertype.servertype-1&quot;,&quot;SASjsRequest&quot;:&quot;interfaces/sasjsrequest.sasjsrequest-1&quot;,&quot;SASjsWaitingRequest&quot;:&quot;interfaces/sasjswaitingrequest.sasjswaitingrequest-1&quot;},&quot;SAS Viya API Client&quot;:&quot;classes/sasviyaapiclient.sasviyaapiclient-1&quot;,&quot;SAS 9 API Client&quot;:&quot;classes/sas9apiclient.sas9apiclient-1&quot;}
</ul>
</nav>
</div>
<div class="col-7 offset-3 col-content">
<h1>sasjs</h1>
<div class="tsd-panel tsd-typography">
<p><a href="https://www.jsdelivr.com/package/npm/sasjs"><img src="https://data.jsdelivr.com/v1/package/npm/sasjs/badge" alt=""></a></p>
<a href="#sasjs" id="sasjs" style="color: inherit; text-decoration: none;">
<h1>SASjs</h1>
</a>
<p>SASjs is a open-source framework for building Web Apps on SAS® platforms. You can use as much or as little of it as you like. This repository contains the JS adapter, the part that handles the to/from SAS communication on the client side. There are 3 ways to install it:</p>
<p>1 - <code>npm install sasjs</code> - for use in a node project</p>
<p>2 - <a href="https://cdn.jsdelivr.net/npm/sasjs/index.js">Download</a> and use a copy of the latest JS file</p>
<p>3 - Reference directly from the CDN - in which case click <a href="https://www.jsdelivr.com/package/npm/sasjs?tab=collection">here</a> and select &quot;SRI&quot; to get the script tag with the integrity hash.</p>
<p>If you are short on time and just need to build an app quickly, then check out <a href="https://vimeo.com/393161794">this video</a> and the <a href="https://github.com/macropeople/react-seed-app">react-seed-app</a> which provides some boilerplate.</p>
<p>For more information on building web apps with SAS, check out <a href="https://sasjs.io">sasjs.io</a></p>
<a href="#none-of-this-makes-sense--how-do-i-build-an-app-with-it" id="none-of-this-makes-sense--how-do-i-build-an-app-with-it" style="color: inherit; text-decoration: none;">
<h2>None of this makes sense. How do I build an app with it?</h2>
</a>
<p>Ok ok. Deploy this <a href="https://github.com/macropeople/sasjs/blob/master/example.html">example.html</a> file to your web server, and update <code>servertype</code> to <code>SAS9</code> or <code>SASVIYA</code> depending on your backend.</p>
<p>The backend part can be deployed as follows:</p>
<pre><code>%let appLoc=/<span class="hljs-built_in">Public</span>/app/readme; <span class="hljs-comment">/* Metadata or Viya Folder location as per SASjs config */</span>
<span class="hljs-comment">/* compile macros (can also be downloaded &amp; compiled seperately) */</span>
filename mc url &quot;https://raw.githubusercontent.com/macropeople/macrocore/master/mc_all.sas&quot;;
%inc mc;
filename ft15f001 <span class="hljs-keyword">temp</span>;
parmcards4;
%webout(<span class="hljs-keyword">FETCH</span>) <span class="hljs-comment">/* receive all data as SAS datasets */</span>
proc <span class="hljs-keyword">sql</span>;
<span class="hljs-keyword">create</span> <span class="hljs-keyword">table</span> areas <span class="hljs-keyword">as</span> <span class="hljs-keyword">select</span> make,mean(invoice) <span class="hljs-keyword">as</span> avprice
<span class="hljs-keyword">from</span> sashelp.cars
<span class="hljs-keyword">where</span> <span class="hljs-keyword">type</span> <span class="hljs-keyword">in</span> (<span class="hljs-keyword">select</span> <span class="hljs-keyword">type</span> <span class="hljs-keyword">from</span> <span class="hljs-keyword">work</span>.fromjs)
<span class="hljs-keyword">group</span> <span class="hljs-keyword">by</span> <span class="hljs-number">1</span>;
%webout(<span class="hljs-keyword">OPEN</span>)
%webout(OBJ,areas)
%webout(<span class="hljs-keyword">CLOSE</span>)
;;;;
%mp_createwebservice(<span class="hljs-type">path</span>=&amp;appLoc/common,<span class="hljs-type">name</span>=getdata)</code></pre><p>You now have a simple web app with a backend service!</p>
<a href="#more-resources" id="more-resources" style="color: inherit; text-decoration: none;">
<h1>More resources</h1>
</a>
<p>For more information specific to this adapter you can check out this <a href="https://sasjs.io/sasjs/sasjs-adapter/">user guide</a> or the <a href="http://adapter.sasjs.io/">technical</a> documentation. </p>
<p>For more information on building web apps in general, check out these <a href="https://sasjs.io/training/resources/">resources</a> or contact the <a href="https://www.linkedin.com/in/allanbowe/">author</a> directly.</p>
</div>
<!--{&quot;options&quot;:&quot;/Users/allan/git/sasjs&quot;,&quot;tsconfig&quot;:&quot;/Users/allan/git/sasjs&quot;,&quot;inputFiles&quot;:[&quot;/Users/allan/git/sasjs/src/SAS9ApiClient.ts&quot;,&quot;/Users/allan/git/sasjs/src/SASViyaApiClient.ts&quot;,&quot;/Users/allan/git/sasjs/src/SASjs.ts&quot;,&quot;/Users/allan/git/sasjs/src/index.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/Context.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/CsrfToken.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/Folder.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/Job.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/JobResult.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/Link.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/SASjsConfig.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/SASjsRequest.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/SASjsWaitingRequest.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/ServerType.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/Session.ts&quot;,&quot;/Users/allan/git/sasjs/src/types/index.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/asyncForEach.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/compareTimestamps.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/convertToCsv.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/index.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/isAuthorizeFormRequired.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/isLoginRequired.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/isLoginSuccess.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/makeRequest.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/needsRetry.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/parseAndSubmitAuthorizeForm.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/parseGeneratedCode.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/parseSasViyaLog.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/parseSourceCode.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/serialize.ts&quot;,&quot;/Users/allan/git/sasjs/src/utils/splitChunks.ts&quot;],&quot;mode&quot;:1,&quot;includeDeclarations&quot;:true,&quot;entryPoint&quot;:&quot;&quot;,&quot;exclude&quot;:[&quot;**/*+(index|.spec|.e2e).ts&quot;],&quot;externalPattern&quot;:[],&quot;excludeExternals&quot;:true,&quot;excludeNotExported&quot;:true,&quot;excludeNotDocumented&quot;:false,&quot;excludePrivate&quot;:true,&quot;excludeProtected&quot;:false,&quot;ignoreCompilerErrors&quot;:true,&quot;disableSources&quot;:false,&quot;includes&quot;:&quot;&quot;,&quot;media&quot;:&quot;&quot;,&quot;out&quot;:&quot;docs&quot;,&quot;json&quot;:&quot;&quot;,&quot;theme&quot;:&quot;./node_modules/typedoc-neo-theme/bin/default&quot;,&quot;name&quot;:&quot;&quot;,&quot;includeVersion&quot;:false,&quot;excludeTags&quot;:[],&quot;readme&quot;:&quot;&quot;,&quot;defaultCategory&quot;:&quot;Other&quot;,&quot;categoryOrder&quot;:[],&quot;categorizeByGroup&quot;:true,&quot;gitRevision&quot;:&quot;&quot;,&quot;gitRemote&quot;:&quot;origin&quot;,&quot;gaID&quot;:&quot;&quot;,&quot;gaSite&quot;:&quot;auto&quot;,&quot;hideGenerator&quot;:false,&quot;toc&quot;:[],&quot;disableOutputCheck&quot;:true,&quot;help&quot;:false,&quot;version&quot;:false,&quot;plugin&quot;:[],&quot;logger&quot;:&quot;console&quot;,&quot;listInvalidSymbolLinks&quot;:false,&quot;links&quot;:[{&quot;label&quot;:&quot;SASjs on Github&quot;,&quot;url&quot;:&quot;https://github.com/macropeople/sasjs&quot;},{&quot;label&quot;:&quot;SASjs.io&quot;,&quot;url&quot;:&quot;https://sasjs.io&quot;},{&quot;label&quot;:&quot;SASjs CLI&quot;,&quot;url&quot;:&quot;https://github.com/macropeople/sasjs-cli&quot;},{&quot;label&quot;:&quot;React Seed App&quot;,&quot;url&quot;:&quot;https://github.com/macropeople/react-seed-app&quot;}],&quot;outline&quot;:[{&quot;SAS Adapter&quot;:{&quot;SASjs&quot;:&quot;modules/sasjs&quot;,&quot;SASjsConfig&quot;:&quot;classes/sasjsconfig.sasjsconfig-1&quot;,&quot;ServerType&quot;:&quot;enums/servertype.servertype-1&quot;,&quot;SASjsRequest&quot;:&quot;interfaces/sasjsrequest.sasjsrequest-1&quot;,&quot;SASjsWaitingRequest&quot;:&quot;interfaces/sasjswaitingrequest.sasjswaitingrequest-1&quot;},&quot;SAS Viya API Client&quot;:&quot;classes/sasviyaapiclient.sasviyaapiclient-1&quot;,&quot;SAS 9 API Client&quot;:&quot;classes/sas9apiclient.sas9apiclient-1&quot;}],&quot;disableAutoModuleName&quot;:&quot;false&quot;}-->
</div>
<div class="col-2 col-menu secondary-menu">
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
</body>
</html>