On branch master
Changes to be committed:
modified: server/api/optionControlFile/index.js
modified: server/express.js
modified: server/routes.js
router.get('/:commandName', function(req, res) {
var optionJSON = require(__dirname + '/../../../user-specific-files/OptionControlFile/commands/' + req.params.commandName);
- res.send(optionJSON);
+ var info = {
+ status: 'success',
+ info: optionJSON
+ };
+ res.send(info);
});
module.exports = router;
app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
+ app.use(express.static(__dirname + '/../front-end/dist/'))
if(app.get('env') === 'development') {
- app.use(express.static(__dirname + '/../front-end/dist/'))
} else if(app.get('env') === 'production') {
- app.use(express.static(__dirname + '../front-end/dist/'))
}
};
app.route('/*')
.get(function(req, res) {
- if(app.get('env') === 'development') {
- res.sendFile('index.html', { root: path.normalize(__dirname + '/../front-end/dist') });
- } else if(app.get('env') === 'production') {
- //res.sendFile('index.html', {root: path.normalize(__dirname + '/../dist')})
- }
+ res.sendFile('index.html', { root: path.normalize(__dirname + '/../front-end/dist') });
})
};