npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sassoftware/viya-serverjs

v0.3.0

Published

Easy to use app server for SAS Viya applications

Readme

Application servers for use with SAS Viya

This package has two servers:

  1. viya-appserverjs - Use this for developing an app server for web applications(see packages/appjs)

  2. viya-apiserverjs - Use this to develop rest api servers(see packages/apijs)

Usage

Specify it as a dependency in your package.json just as you do with other dependencies

Use npx command to start the server

npx @sassoftware/viyaappserverjs

Basic configuration

  1. Set the default settings in Dockerfile. This will ensure these are set when you build containers.
  2. The defaults can be overriden using environment variables.

Sample env file

When running on a non-docker environment, you can use a .env

VIYA_SERVER=<your viya server>
APPHOST=localhost < can also be dns name of your server. ex: viyaiscool.unx.sas.com>
APPPORT=5000   <any port of your choice>
APPNAME=viyaapp

CLIENTID=viyaapp
CLIENTSECRET=secret

Sample Dockerfile

FROM node:12.16.1-alpine
LABEL maintainer="your email"
WORKDIR /usr/src/app
COPY . .
RUN npm install
# RUN npm run build (if you have to build something)
EXPOSE 8080
ENV APPHOST=0.0.0.0

AUTHFLOW=code

# The following are defaults. Override them as needed
# APPLOC - where the file specified in APPENTRY is
# APPENTRY - the main entry of the application
ENV APPLOC=./public
ENV APPENTRY=index.html
# if your app takes advantage of appenv.js to pass configuration to the web application 
# ENV APPENV=appenv.js 

# See notes below on running with SSL enabled
ENV TLS_CREATE="C:US,ST:NC,L:Cary,O:yourcompany,OU:STO,CN:localhost"
ENV SAMESITE=None,secure

# It is better to set this before invoking the server
ENV NODE_TLS_REJECT_UNAUTHORIZED=0

# set this to YES if you want access to the authentication token in the app
ENV USETOKEN=NO

CMD ["npx", "@sassoftware/viya-appserverjs"]

Running with SSL enabled -- Recommended

This is the recommended setting. This will also make browsers like Chrome run with the SAMESITE settings set to Default - your users will thank you.

Make sure you specify the VIYA_SERVER with a protocol of https.

TLS certificates

  • Option 1: Let server create a temporary unsigned certificate

    ENV TLS_CREATE=C:US,ST:NC,L:Cary,O:YourCompany,OU:yourgroup,CN:localhost
  • Option 2: Provide your own key and certificate key

ENV TLS_KEY=../certs/self/key.pem
ENV TLS_CERT=../certs/self/certificate.pem
  • Option 3: Provide key and certificate as a pfx file
ENV TLS_PFX=../certs/sascert/sascert2.pfx