Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrion committed Nov 11, 2016
1 parent 6934a13 commit 1f1a016
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions api/nativefier/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var express = require('express');

var router = express.Router();

// Gets a list of Things
Expand All @@ -11,9 +10,9 @@ function nativefier(req, res) {
options.out = './outputs';

nativefier(options, function(error, appPath) {
if (error) {
return res.json({'error': error});
}
if (error) {
return res.json({'error': error});
}
return res.json({'success': 'App has been nativefied to ' + appPath});
});
}
Expand Down
5 changes: 2 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ var express = require('express');
var path = require('path');
var app = express();
var port = process.env.PORT || 8080;
var nativefier = require('nativefier');
var bodyParser = require('body-parser');
app.use( bodyParser.json() );
app.use(bodyParser.urlencoded({
extended: true
}));

app.use(express.static('client'));
app.use(express.static(__dirname + '/client'));

app.use('/api/nativefier', require('./api/nativefier/index'));

Expand All @@ -24,5 +23,5 @@ app.get('/', function (req, res) {
});

app.listen(port, function () {
console.log('Example app listening on port ' + port)
console.log('Express server listening on port ' + port)
});

0 comments on commit 1f1a016

Please sign in to comment.