Namespace: webconfig

NA#webconfig

Content of Webconfig file enhenced by `NA#configuration` and CLI commands.
Source:

Namespaces

less
stylus

Members

assetsCopy :boolean

Disable Assets generation mechanism.
Type:
  • boolean
Default Value:
  • true
Source:

assetsRelativePath :string

Folder for public file like images, CSS, JS...
Type:
  • string
Default Value:
  • "assets"
Source:

bundles :Object

Configuration for CSS minification/bundle and JS obfuscation/bundle.
Type:
  • Object
Properties:
Name Type Description
bundles Object The bundles object.
Properties
Name Type Description
javascripts Object Each object name represent an output javascript file and each property of object represent an array of inputs files.
stylesheets Object Each object name represent an output stylesheet file and each property of object represent an array of inputs files.
Source:
Example
{
    "javascripts": {
        "javascript/framework.min.js": [
            "javascript/modernizr.js",
            "javascript/jquery.js",
            "javascript/prettify.js",
            "javascript/prettify/run_prettify.js"
        ],
        "javascript/common.min.js": [
            "javascript/components/extended-format-date.js",
            "javascript/common.js"
        ]
    },
    "stylesheets": {
        "stylesheets/common.min.css": [
            "stylesheets/common.css",
            "stylesheets/common-min780.css",
            "stylesheets/common-min1160.css"
        ]
    }
}

cache :boolean

Avoil all caching at all level (server, template engine...). Do not use in production.
Type:
  • boolean
Default Value:
  • false
Source:

charset :string

Default Charset used for all pages.
Type:
  • string
Default Value:
  • "utf-8"
Source:

controller :string

Name of file for `common` controller.
Type:
  • string
Source:

controllersRelativePath :string

Controller folder for Back-end part.
Type:
  • string
Default Value:
  • "controllers"
Source:

cssBundlingBeforeResponse :boolean

CSS minification before each HTML response.
Type:
  • boolean
Default Value:
  • false
Source:

cssBundlingEnable :boolean

No CSS minification if set to false.
Type:
  • boolean
Default Value:
  • true
Source:

delete :boolean

Allow you to avoid or authorize DELETE response for all page.
Type:
  • boolean
Default Value:
  • false
Source:

get :boolean

Allow you to avoid or authorize GET response for all page.
Type:
  • boolean
Default Value:
  • true
Source:

headers :Object

Default Headers used for all pages.
Type:
  • Object
Default Value:
  • {}
Source:

htmlGenerationBeforeResponse :boolean

Allow NodeAtlas to generate real file into `NA#webconfig.serverlessRelativePath` directory if set to true.
Type:
  • boolean
Default Value:
  • false
Source:

httpHostname :string

Server listening hostname by HTTP.
Type:
  • string
Default Value:
  • « The webconfig's property `httpHostname` » || « The `process.env.IP_ADDRESS` if setted » || "localhost";
Source:

httpPort :string

Server listening port.
Type:
  • string
Default Value:
  • « The webconfig's property `httpPort` » || « The `process.env.PORT` if setted » || « 443/80 default port »
Source:

httpSecure :boolean|string|Object

Define is site is running with HTTP(S) protocol.
Type:
  • boolean | string | Object
Default Value:
  • false
Source:

httpSecureCertificateRelativePath :string

Define the path to the Certificate for HTTPs.
Type:
  • string
Source:

httpSecureKeyRelativePath :string

Define the path to the Private Key for HTTPs.
Type:
  • string
Source:

index :boolean

Allow NodeAtlas to create a root page with a link for each routes if set to true.
Type:
  • boolean
Default Value:
  • false
Source:

injectCss :string|Array.<string>

CSS files for common injection of CSS.
Type:
  • string | Array.<string>
Source:

jsBundlingBeforeResponse :boolean

JavaScript obfuscation before each HTML response.
Type:
  • boolean
Default Value:
  • false
Source:

jsBundlingEnable :boolean

No JavaScript obfuscation if set to false.
Type:
  • boolean
Default Value:
  • true
Source:

languageCode :string

Represent the global and main language code for website.
Type:
  • string
Default Value:
  • undefined.
Source:

middlewares :string

Allow you to set Express middleware for all routes.
Type:
  • string
Source:

middlewaresRelativePath :string

Controller folder for Middlewares part.
Type:
  • string
Default Value:
  • "middlewares"
Source:

mimeType :string

Default Content-Type used for all pages.
Type:
  • string
Default Value:
  • "text/html"
Source:

options :boolean

Allow you to avoid or authorize OPTIONS response for all page.
Type:
  • boolean
Default Value:
  • false
Source:

output :boolean

Disable HTML generation mechanism.
Type:
  • boolean
Default Value:
  • true
Source:

pageNotFound :string

Represent route to use if no route match in all route.
Type:
  • string
Source:

post :boolean

Allow you to avoid or authorize POST response for all page.
Type:
  • boolean
Default Value:
  • true
Source:

pug :boolean

Enable Pug preprocessor.
Type:
  • boolean
Default Value:
  • false
Source:

put :boolean

Allow you to avoid or authorize PUT response for all page.
Type:
  • boolean
Default Value:
  • false
Source:

routes :Object|Array

Contain all routes into an Object or an Array depending how the intial format setted.
Type:
  • Object | Array
Default Value:
  • « The webconfig's object property `routes` »
Source:

serverlessRelativePath :string

HTML assets generation Folder.
Type:
  • string
Default Value:
  • "serverless"
Source:

session :Object

Use a more complexe session cookie options. Replace `NA#webconfig.sessionKey` and `NA#webconfig.sessionSecret` if set.
Type:
  • Object
Source:
See:

sessionKey :string

Name for Session cookie of connected user.
Type:
  • string
Default Value:
  • "nodeatlas.sid"
Source:

sessionSecret :string

Secret for Session cookie of connected user.
Type:
  • string
Default Value:
  • '1234567890bépo'.
Source:

socketClientFile :string

Deliver the client-side window.NA.socket and window.NA.io object.
Type:
  • string
Default Value:
  • "/node-atlas/socket.io.js"
Source:

socketServerOptions :Object

Allow you to extend Socket.IO options object.
Type:
  • Object
Source:

staticOptions :string

Set information for static file from `assetsRelativePath`.
Type:
  • string
Source:
See:

statics :Object|Array

Contain all statics files into an Object or an Array depending how the intial format setted.
Type:
  • Object | Array
Default Value:
  • « The webconfig's object property `statics` »
Source:

templateEngineDelimiter :string

Set open and close bracket used by Teplate Engine.
Type:
  • string
Default Value:
  • "?"
Source:

urlHostname :string

Url access hostname (for reverse proxy).
Type:
  • string
Default Value:
  • undefined
Source:

urlPort :string

Url access port (for reverse proxy).
Type:
  • string
Default Value:
  • undefined
Source:

urlRoot :string

Website http(s) absolute url based from `NA#webconfig.httpSecure`, `NA#webconfig.urlHostname` and `NA#webconfig.urlPort`. This value does not contain `NA#webconfig.urlRelativeSubPath`.
Type:
  • string
Source:

variation :string

Name of file for `common` variation.
Type:
  • string
Source:

variationsRelativePath :string

Language and variable variation files folder depending of languages.
Type:
  • string
Default Value:
  • "variations"
Source:

version :string

Find the version of current NodeAtlas website.
Type:
  • string
Default Value:
  • "0.0.0"
Source:

view :string

Name of file for `common` view.
Type:
  • string
Source:

viewsRelativePath :string

View folder for Template Engine files.
Type:
  • string
Default Value:
  • "views"
Source: