Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (34 sloc) 1.14 KB
config = require './lib/config'
# You can override the configured defaults for port and host with flags.
option '-p', "--port [#{config.port}]", 'port the server runs on'
option '-h', "--host [#{}]", 'base server name'
option '-s', "--secret [#{config.secret}]", 'session secret'
task 'runserver', 'Run the server.', (options) ->
server = require './lib/server'
host: or
port: options.port or config.port
secret: options.secret or config.secret
dbhost: config.dbhost
dbport: config.dbport
dbname: config.dbname
task 'resave', 'Resave all ideas, to recreate their images.', (options) ->
mongoose = require 'mongoose'
db = mongoose.connect(
models = require('./lib/schema')
models.Idea.find {}, (err, docs) ->
count = docs.length
exitCode = 0
for doc in docs
doc.incImageVersion() (err) ->
if err?
exitCode = 1
console.log(count, err)
if count == 0
Something went wrong with that request. Please try again.