bmatusiak / welder-app

Minimal Welder App

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

welder-app

welder-app is a basic template based off the architect and express


Startup Process

  1. Static Files
  2. Middlewares
  3. Request Parsers

Welder Functions

addStatic(mount,dir,listDirAlso)

  • mount : is the Web Directory
  • dir : is the Server Directory
  • listDirAlso : is to provide directory listings

addMiddleWare:function(fn)

  • fn(http) : provides the http object

addRequestParser:function(fn)

  • fn(http) : provides the http object

Welder Objects

http

the http object is a pre-setup express objects

  • app : provides direct access to the express app
  • server : provides direct access to the http server
  • express : provides direct access to the express object
  • listen : used by welder internaly function(port,ip,callback) but can be used to listen on another port

How pre-setup express is configured

Express is setup to compress all output.

bodyParser and cookieParser are loaded before middlewares

Example Plugins

app.main : Shows how to add a RequestParser and architect plugin

app.session : Shows how to add a Middleware and architect plugin with plugin dependency

db.mongoose : Shows how to add a General architect plugin

Version interp

the relates to the package.js file

As you can see the version of your app should be in a fourm of "X.Y.Z"

and X if the welder version so you can always know what version of welder you have

and Y is release version

and Z is sub-release version

{
    "name": "welder-app",
    "version": "1.1.32",
    "dependencies": {
        "express": "*",
        "architect": "*",
        "mongoose": "*"
    }
}

About

Minimal Welder App

License:GNU General Public License v3.0


Languages

Language:CSS 80.1%Language:JavaScript 19.9%