ducky/web

Paddy 2015-07-07 Parent:99a43a6d1d30

21:bc1478742a50 Go to Latest

ducky/web/bin/dev-server

Implement subscriptions. Create a Subscription model and a Subscriptions collection, and attach them to the app context. Add a helper to our Profile model to retrieve the Subscription of that model. Still not sure this should be on the Profile--wouldn't it be better on the Me model? Isn't that generally where we would need it?

History
1 #!/usr/bin/env node
3 var fs = require('fs')
4 var path = require('path')
5 var webpack = require('webpack')
6 var WebpackDevServer = require('webpack-dev-server')
7 var argv = require('minimist')(process.argv.slice(2))
8 var findRoot = require('find-root')
9 var rootFolder = findRoot(process.env.PWD)
11 var configfile = '';
13 // get config
14 if (argv.config) {
15 configfile = path.resolve(argv.config)
16 } else {
17 configfile = path.resolve(path.join(rootFolder, 'webpack.config.js'))
18 }
19 argv.config = require(configfile);
21 // run it
22 new WebpackDevServer(webpack(argv.config), {
23 historyApiFallback: true,
24 hot: true,
25 publicPath: argv.config.output.publicPath,
26 }).listen(argv.config.port, argv.config.host, function (err, result) {
27 if (err) {
28 console.log(err)
29 }
30 console.log('development server running at: http://' + argv.config.host + ':' + argv.config.port)
31 })