polar
v0.4.3
Published
boilerplate for a basic express setup with metaserve
Downloads
26
Readme
polar
Boilerplate for a basic Express setup.
- Simple request logging
- Cookie and form parsing
- Jade templating
- Static file serving
- Static file preprocessing (with Metaserve)
Usage
Create an app instance just as you would with Express, passing options to polar
. Start the app with app.start()
.
polar = require 'polar'
app = polar
port: 8583
app.get '/', (req, res) ->
res.render 'hi',
date: new Date()
app.start()
Options
port
REQUIRED — Port for your app to listen onmiddleware
— Array of middleware functionsmetaserve
— Metaserve options object, default uses metaserve-css-styl and metaserve-js-coffee-reactifyview_dir
— Directory to look for view templates in, default is/views
view_engine
— Templating engine, default is Jadeno_cookie_parser
— Do not useexpress.cookieParser
no_body_parser
— Do not useexpress.bodyParser
session
— Configuration for connect-redis, default is null (no sessions)secret
— Secret key for connect-redis sessions