Any custom page
, rest
, or auth
Spaces
you include in your project will be configure as
above. The stringName
is just an unique-identifier used for logging
purposes.
Home: {
type: 'page',
config: {
name: 'home',
scheme: '/home/',
title: 'Home Page',
description: 'Landing Page',
page: {
title: () => ('Welcome to My Page'),
CSS: ['styles','font-awesome'],
main: 'stock',
type: 'jumbo',
},
},
},
A list of SPCE.Push objects, each describing a File
that will always be
HTTP-PUSHED to the Client Browser when pages are requested.
The Global Space
confirguration. The default string
-properties can be alter to your liking, and
other, custom auth
/rest
Spaces
can be added to the expose
-property list.
The main authenticator. If using authentication (configured in config/setting.cfg.js
), this is
Space
that would handle this. You can also secondary, custom auth
Spaces
.
The main data-request Space
. You can also secondary, custom rest
Spaces
.
A plain-object, describing a collection of
NameSpaces
(or simply,Spaces
) that will be used to serve webpages/files, handle data-reqests, and/or authenitcation.Example
These are placed in
config/namespaces.cfg.js
.module.exports = { PUSH: [ { enc: 'Base64', path: '/public/images/logo.png' }, { enc: 'utf8', path: '/public/js/vendor.js' }, { enc: 'utf8', path: '/public/js/engine.js' }, ], Global: { // RESERVED ~ !!! config: { ... }, expose: ['accessor','rest'], }, Accessor: { // RESERVED ~ !!! type: 'auth', config: { ... }, }, REST: { // RESERVED ~ !!! type: 'rest', config: { ... }, }, Error: { type: 'page', config: { name: 'error', scheme: '/404/', title: '404 Error', description: 'Displaying Errors', page: { title: () => '404 Error', CSS: ['style'], styles: false, main: 'evectr', type: 'jumbo', }, }, }, Home: { type: 'page', config: { name: 'home', scheme: '/home/', title: 'Home Page', description: 'Landing Page', page: { title: () => ('Welcome to My Page'), CSS: ['styles','font-awesome'], main: 'stock', type: 'jumbo', }, }, }, };