Skip to content

Instantly share code, notes, and snippets.

@ritch
Last active February 2, 2017 00:14
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ritch/9f1aeccde4bdd01bb12a to your computer and use it in GitHub Desktop.
Input files for the Express.js scaffolding tool
var $ = exports
$.GENERATORS = [
'package',
'app',
'error',
'start',
'resource',
'view',
'orm',
'build',
'test',
'auth'
]
// What language?
$.LANGUAGE = 'javascript'
// LANGUAGE = 'coffeescript'
// LANGUAGE = 'typescript'
// LANGUAGE = 'es6 + tracuer'
$.SRC_EXT = 'js'
// What code pattern?
$.PATTERN = 'mvc'
// Use Resourceful routing?
$.ROUTING_STYLE = 'resource' // resource.index = function
// ROUTING_STYLE = 'plain' // app.get('/foo')
// What style for async?
$.ASYNC = 'callbacks'
// ASYNC = 'promises'
// ASYNC = 'generators'
// What library for callbacks or promises
$.ASYNC_LIB = 'async'
// ASYNC_LIB = 'bluebird'
// ASYNC_LIB = 'es6'
// ASYNC_LIB = null // no lib
// What type of app?
$.APP_TYPE = 'traditional web'
// APP_TYPE = 'single page'
// APP_TYPE = 'data only rest'
// What templating engine?
$.TEMPLATING = 'jade'
// TEMPLATING = 'dustjs-linkedin'
// TEMPLATING = 'ejs'
// Realtime support?
$.REALTIME = true
$.REALTIME_LIB = 'engine.io'
// REALTIME_LIB = 'sockjs'
// REALTIME_LIB = 'faye'
// REALTIME_LIB = 'socket.io'
// Does this app need to interact with a database or orm?
$.ORM_LIB = 'juggler'
// ORM_LIB = 'waterline'
// ORM_LIB = 'sequelize'
// How do you want to configure your app?
$.CONFIG_TYPE = 'yaml'
// CONFIG_TYPE = 'json'
// Validation
$.VALIDATION_LIB = 'anchor'
// VALIDATION_LIB = 'juggler'
// VALIDATION_LIB = 'joi'
// VALIDATION_LIB = 'validation.js'
// Testing Library
$.TEST_LIB = 'mocha'
// $.TEST_LIB = 'tap'
// Build
$.BUILD_TOOL = 'gulp'
// BUILD_TOOL = 'grunt'
// BUILD_TOOL = null
// Auth module
$.AUTH = 'passport'
// $.AUTH = null // to disable auth
// Error Handling
$.USE_DOMAINS = true
$.CUSTOM_404_PAGE = 'views/errors/404'
$.CUSTOM_500_PAGE = 'views/errors/500'
$.CUSTOM_ERRORS = true
// Which servers should be created
$.HTTP = true
$.HTTPS = false
// Remove semicolons from generated scripts
$.STRIP_SEMICOLONS = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment