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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wincc-oa/create-backend

v1.0.1

Published

Scaffold a WinCC OA webserver.js backend project

Readme

@wincc-oa/create-backend

Scaffolds a new SIMATIC WinCC Open Architecture webserver.js customization project with working examples for custom request handlers, HTTP endpoints, and routes -- in both TypeScript and CTRL.

Quick start

npx @wincc-oa/create-backend my-backend

This creates a my-backend sub-directory containing a ready-to-use WinCC OA sub-project structure. You can also scaffold into an existing (empty) directory:

mkdir my-backend
cd my-backend
npx @wincc-oa/create-backend .

Important: Always use the version of create-backend that matches your WinCC OA installation. The correct version can be found in javascript/webserver-js/package.json inside your installation directory. To install a specific version:

npx @wincc-oa/[email protected] my-backend

Note that this will create a complete WinCC OA sub-project structure - the TypeScript code and pacakge definition can be found in <project-directory>/javascript/customer-webserver-example

Usage

npx @wincc-oa/create-backend <project-directory>

| Argument | Description | | --------------------- | ----------------------------------------------------------------- | | <project-directory> | Name of the directory to create, or . for the current directory | | -h, --help | Show help |

Generated project structure

<project-directory>/
  README.md
  javascript/
    customer-webserver-example/
      src/
        index.ts                     # Entry point exports
        customerDashboardServer.ts   # Custom WsjDashboardServer subclass
        customerTsRequestHandler.ts  # Example TypeScript request handler
        customerRoutes.ts            # Example Express-style routes
        connectionsRoute.ts          # Example route definition
        connectionsController.ts     # Example controller (JSON/Markdown/HTML)
      run.js                         # JavaScript Manager entry point
      package.json
      tsconfig.json
      eslint.config.mjs
      .prettierrc
      .gitignore
  scripts/
    libs/classes/wsjServer/
      WsjEmbeddedCtrlUser.ctl        # CTRL extension point (registers handlers)
      CustomerCtrlRequestHandler.ctl # Example CTRL request handler
      CustomerCtrlHttpEndpoints.ctl  # Example CTRL HTTP endpoint

Setup after scaffolding

  1. Add the project to your WinCC OA project

    Add the project directory to the list of sub-projects in config/config.

  2. Install dependencies

    cd <project-directory>/javascript/customer-webserver-example
    npm install
    npm install --save-dev <path-to-installation>/javascript/@types/winccoa-manager
  3. Build

    npm run build

    Or start a watcher for automatic re-compilation:

    npm run watch
  4. Add a JavaScript Manager

    Create a JavaScript Manager in your WinCC OA project with customer-webserver-example/run.js as its parameter.

  5. Lint and format (optional)

    npm run lint
    npm run format
  6. Modify

    After you're familiar with the example project, you likely will rename it and replace the example code with the final webserver.js modifications

Included examples

The template contains working examples for the most common customization scenarios:

TypeScript

| File | What it demonstrates | | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | customerDashboardServer.ts | Subclassing WsjDashboardServer to register custom handlers and routes | | customerTsRequestHandler.ts | Implementing a request handler with one-shot (type.name) and live-subscription (connect/disconnect via dpConnect) commands | | customerRoutes.ts | Adding Express-style HTTP routes (static files, dynamic endpoints, CTRL endpoints) | | connectionsController.ts | A controller that queries WinCC OA data and returns JSON, Markdown, or HTML |

CTRL

| File | What it demonstrates | | -------------------------------- | -------------------------------------------------------------------------- | | CustomerCtrlRequestHandler.ctl | Implementing a request handler in CTRL (customization.example.disk.free) | | CustomerCtrlHttpEndpoints.ctl | Implementing an HTTP endpoint in CTRL (HTML page) | | WsjEmbeddedCtrlUser.ctl | Registering CTRL handlers and routing CTRL endpoint calls |

Dependencies

The generated project depends on @wincc-oa/backend, which provides base classes and utilities for webserver.js backend development:

  • WsjDashboardServer -- base server class
  • WsjRequestHandlerBase / WsjRequestHandlerRegistry -- request handler infrastructure
  • WsjRoutes, WsjStaticLiveDirectoryRoute, WsjCtrlEndpointRoute -- routing utilities
  • WsjAccessControlList -- access control
  • WsjServerGlobal -- global server state and WinCC OA API access

License

MIT