9.1.1 • Published 9 years ago

dragonnodejs-webserver v9.1.1

Weekly downloads
74
License
-
Repository
github
Last release
9 years ago

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":
{
    "dependencies": {
        "dragonnodejs-webserver": "^9.1.1"
    }
}
  • Run "npm install"
  • Extend the configuration in "app.js":
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:
<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
{{ language.example }}
  • "package" with the name and the version of the application from the "/package.json", for example:
{{ package.name }} {{ package.version }}
9.1.1

9 years ago

9.1.0

9 years ago

9.0.0

9 years ago

8.1.1

9 years ago

8.0.1

9 years ago

8.0.0

9 years ago

7.0.1

9 years ago

7.0.0

9 years ago

6.0.0

9 years ago

5.0.0

9 years ago

4.3.0

9 years ago

4.2.0

9 years ago

4.1.0

9 years ago

4.0.0

9 years ago

3.0.3

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.1.0

9 years ago

2.0.0

10 years ago

1.0.0

10 years ago