# @webruntime/framework-server

> Not all projects are equal and definitely not all projects are [turn-key](https://git.soma.salesforce.com/communities/create-talon-app). If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in N

Latest version **0.18.49** (published 2020-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @webruntime/framework-server
pnpm add @webruntime/framework-server
yarn add @webruntime/framework-server
bun add @webruntime/framework-server
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.18.49 |
| Published | 2020-01-10 |
| First published | 2020-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 40 |
| Unpacked size | 208.4 KB |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | diervo, tconn, zhawtof |

## Links

- npm: https://www.npmjs.com/package/@webruntime/framework-server
- npm.io page: https://npm.io/package/@webruntime/framework-server

## Dependencies (40)

- [csurf](https://npm.io/package/csurf.md) ^1.9.0
- [memfs](https://npm.io/package/memfs.md) ^2.9.4
- [touch](https://npm.io/package/touch.md) ^3.1.0
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [helmet](https://npm.io/package/helmet.md) ^3.21.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [pretty](https://npm.io/package/pretty.md) ^2.0.0
- [rollup](https://npm.io/package/rollup.md) ^1.7.4
- [terser](https://npm.io/package/terser.md) ^3.16.1
- [uuidv4](https://npm.io/package/uuidv4.md) ^4.0.0
- [express](https://npm.io/package/express.md) ^4.16.3
- [unionfs](https://npm.io/package/unionfs.md) ^3.0.2
- [chokidar](https://npm.io/package/chokidar.md) ^3.2.2
- [memoizee](https://npm.io/package/memoizee.md) ^0.4.14
- [fast-glob](https://npm.io/package/fast-glob.md) ^2.2.6
- [handlebars](https://npm.io/package/handlebars.md) ^4.5.3
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^5.2.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.5.5
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0
- [compression](https://npm.io/package/compression.md) ^1.7.3
- [folder-hash](https://npm.io/package/folder-hash.md) ^3.0.0
- [jest-worker](https://npm.io/package/jest-worker.md) ^24.6.0
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.8.9
- [@lwc/compiler](https://npm.io/package/@lwc/compiler.md) 1.1.12
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.4.4
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^3.0.0
- [@lwc/rollup-plugin](https://npm.io/package/@lwc/rollup-plugin.md) 1.1.12
- [@webruntime/common](https://npm.io/package/@webruntime/common.md) 0.18.49
- [@webruntime/design](https://npm.io/package/@webruntime/design.md) 0.18.49
- [@webruntime/server](https://npm.io/package/@webruntime/server.md) 0.18.49
- [compose-middleware](https://npm.io/package/compose-middleware.md) ^5.0.1
- [rollup-plugin-babel](https://npm.io/package/rollup-plugin-babel.md) ^4.3.2
- [@webruntime/compiler](https://npm.io/package/@webruntime/compiler.md) 0.18.49
- [node-http-proxy-json](https://npm.io/package/node-http-proxy-json.md) ^0.1.6
- [@webruntime/framework](https://npm.io/package/@webruntime/framework.md) 0.18.49
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^0.20.0
- [rollup-plugin-commonjs](https://npm.io/package/rollup-plugin-commonjs.md) ^9.1.3
- [rollup-plugin-node-resolve](https://npm.io/package/rollup-plugin-node-resolve.md) ^4.2.3
- [@webruntime/metadata-schema](https://npm.io/package/@webruntime/metadata-schema.md) 0.18.49

## Recent versions

- 0.18.49 (latest) — 2020-01-10
- 0.18.47 — 2020-01-10
- 0.18.46 — 2020-01-10
- 0.18.45 — 2020-01-10
- 0.18.39 — 2020-01-06

## README

# Lightning Web Runtime :: Core API

Not all projects are equal and definitely not all projects are [turn-key](https://git.soma.salesforce.com/communities/create-talon-app). If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation [you can find that here](https://git.soma.salesforce.com/communities/webruntime/tree/master/packages/@webruntime/cli).

## Context

Most operations require that a context be already established. The context says a lot about your application and since the compiler is stateless, you will have to establish a context before starting. The context-service provides you with 3 methods: [`startContext`](docs/modules/_context_context_service_.md#startcontext), [`getContext`](docs/modules/_context_context_service_.md#getcontext) and [`endContext`](docs/modules/_context_context_service_.md#endcontext).

### Usage

```javascript
import { startContext } from '@webruntime/api';

await contextService.startContext(options);

try {
    // do something
} finally {
    contextService.endContext();
}
```

### Reference

[Context Service Documentation](docs/modules/_context_context_service_.md)

## Generators

TBD

### Usage

Get all the resources for the current application:

```javascript
import { routeService, resourceService } from '@webruntime/api';

const resources = routeService.getRoutesResources(routes, theme, locale, isDesignMode);
await Promise.all(
    resources.map(routeDescriptor => {
        return resourceService.get(routeDescriptor);
    })
);
```

### Reference

## Express Middlewares

TBD

### Reference

---
_Source: https://npm.io/package/@webruntime/framework-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
