# dragonnodejs-webserver

> Bundle with services to develop serverside rendered applications with swig

Latest version **9.1.1** (published 2015-07-20) · 0 weekly downloads

## Install

```sh
npm install dragonnodejs-webserver
pnpm add dragonnodejs-webserver
yarn add dragonnodejs-webserver
bun add dragonnodejs-webserver
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.1.1 |
| Published | 2015-07-20 |
| First published | 2014-10-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Christoph Herrmann |
| Maintainers | dragonnodejs |

## Links

- npm: https://www.npmjs.com/package/dragonnodejs-webserver
- Repository: https://github.com/dragonnodejs/webserver
- Issues: https://github.com/dragonnodejs/webserver/issues
- npm.io page: https://npm.io/package/dragonnodejs-webserver

## Dependencies (4)

- [swig](https://npm.io/package/swig.md) ^1.4.2
- [underscore](https://npm.io/package/underscore.md) ^1.7.0
- [dragonnodejs](https://npm.io/package/dragonnodejs.md) ^4.0.4
- [accept-language](https://npm.io/package/accept-language.md) ^1.2.0

## Recent versions

- 9.1.1 (latest) — 2015-07-20
- 9.1.0 — 2015-03-23
- 9.0.0 — 2015-03-19
- 8.1.1 — 2015-02-15
- 8.0.1 — 2015-02-09
- 8.0.0 — 2015-02-08
- 7.0.1 — 2015-02-04
- 7.0.0 — 2015-01-27
- 6.0.0 — 2015-01-22
- 5.0.0 — 2015-01-17
- 4.3.0 — 2015-01-16
- 4.2.0 — 2015-01-15
- 4.1.0 — 2015-01-12
- 4.0.0 — 2015-01-12
- 3.0.3 — 2014-11-13
- … 6 more at https://npm.io/package/dragonnodejs-webserver/versions

## README

# DragonNode.js Webserver
Bundle with services to develop applications with express, bower and swig
- Provide the versions of the bower installed libraries in the views
- Provide the language data with the determined language in the views
- Provide the information of the package.json in the views
- Swig express integration to bind ".twig" views to the swig renderer

## Installation
- Add bundle to the "package.json":
```javascript
{
    "dependencies": {
        "dragonnodejs-webserver": "^9.1.1"
    }
}
```
- Run "npm install"
- Extend the configuration in "app.js":
```javascript
var config = {
    modules: {
        npm: [
            [require('dragonnodejs-webserver'), {
                bower: {
                    libraries: [],
                    path: __dirname + '/'
                },
                language: {
                    default: 'en',
                    languages: ['de', 'en'],
                    path: __dirname + '/languages/'
                },
                package: {
                    path: __dirname + '/package.json'
                },
                swig: { 
                    views: __dirname + '/views/' 
                }
            }]
        ]
    }
};
```

## Reserved Swig variables
- "bower" with the versions of the bower installed libraries, for example to include jQuery per dynamic CDN URL:
```html
<script src="//ajax.googleapis.com/ajax/libs/jquery/{{ bower.jquery }}/jquery.min.js"></script>
```
- "language" with the language strings if the language service is used in the current request
```html
{{ language.example }}
```
- "package" with the name and the version of the application from the "/package.json", for example:
```html
{{ package.name }} {{ package.version }}
```

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