Skip to content

Commit

Permalink
Ajusta dependências de arquivos que não são babelify
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola committed Dec 15, 2015
1 parent 418df5b commit 603bdd5
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 26 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PORT=3000
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ coverage

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
.env
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ _modulesQueue2['default'].init();
var app = (0, _express2['default'])();

// view engine setup
app.set('views', _path2['default'].join(__dirname, 'views'));
app.set('views', _path2['default'].join(__dirname, '../views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
Expand All @@ -73,14 +73,14 @@ app.use(_bodyParser2['default'].json());
app.use(_bodyParser2['default'].urlencoded({ extended: false }));
app.use((0, _cookieParser2['default'])());
app.use(_stylus2['default'].middleware({
src: __dirname + '/stylus',
dest: __dirname + '/public',
src: __dirname + '/../stylus',
dest: __dirname + '/../public',
compile: function compile(str, path) {
return (0, _stylus2['default'])(str).set('filename', path).set('compress', true).use((0, _jeet2['default'])())['import']('jeet');
}
}));
app.use(_express2['default']['static'](_path2['default'].join(__dirname, 'public')));
app.get('/main.js', (0, _browserifyMiddleware2['default'])(__dirname + '/client/index.js'));
app.use(_express2['default']['static'](_path2['default'].join(__dirname, '/../public')));
app.get('/main.js', (0, _browserifyMiddleware2['default'])(__dirname + '/../client/index.js'));

app.use('/fila', _kue2['default'].app);
app.use('/', _routesIndex2['default']);
Expand Down
13 changes: 4 additions & 9 deletions dist/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* Module dependencies.
*/

'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
Expand Down Expand Up @@ -40,11 +36,10 @@ var server = _http2['default'].createServer(_app2['default']);
/**
* Listen on provided port, on all network interfaces.
*/
_models2['default'].sequelize.sync().then(function () {
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
});
_models2['default'].sequelize.sync();
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
/**
* Normalize a port into a number, string, or false.
*/
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ queue.init();
let app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('views', path.join(__dirname, '../views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
Expand All @@ -28,8 +28,8 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(stylus.middleware({
src: __dirname + '/stylus',
dest: __dirname + '/public',
src: __dirname + '/../stylus',
dest: __dirname + '/../public',
compile: function (str, path) {
return stylus(str)
.set('filename', path)
Expand All @@ -38,8 +38,8 @@ app.use(stylus.middleware({
.import('jeet');
}
}));
app.use(express.static(path.join(__dirname, 'public')));
app.get('/main.js', browserify(__dirname + '/client/index.js'));
app.use(express.static(path.join(__dirname, '/../public')));
app.get('/main.js', browserify(__dirname + '/../client/index.js'));

app.use('/fila', kue.app);
app.use('/', routes);
Expand Down
13 changes: 6 additions & 7 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ debug('web:server')
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '3000')
let port = normalizePort(process.env.PORT || '3000')
app.set('port', port)

/**
* Create HTTP server.
*/

var server = http.createServer(app)
let server = http.createServer(app)

/**
* Listen on provided port, on all network interfaces.
*/
models.sequelize.sync().then(function () {
server.listen(port)
server.on('error', onError)
server.on('listening', onListening)
})
models.sequelize.sync()
server.listen(port)
server.on('error', onError)
server.on('listening', onListening)
/**
* Normalize a port into a number, string, or false.
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 603bdd5

Please sign in to comment.