• R/O
  • HTTP
  • SSH
  • HTTPS

zephyr: Commit

This repository is for zephyr, which is implemented for a GUI of Eos.


Commit MetaInfo

Revisionbab388afe7286ecb1ae35effc82436d7bd5ebb65 (tree)
Time2016-01-27 23:39:44
Authorhimetani_cafe <fumifumi@yasu...>
Commiterhimetani_cafe

Log Message

[TMP] /workspace page showing workspace files.

On branch master
Changes to be committed:

modified: server/api/optionControlFile/index.js
modified: server/express.js
modified: server/routes.js

Change Summary

Incremental Difference

--- a/server/api/optionControlFile/index.js
+++ b/server/api/optionControlFile/index.js
@@ -5,7 +5,11 @@ var router = express.Router();
55
66 router.get('/:commandName', function(req, res) {
77 var optionJSON = require(__dirname + '/../../../user-specific-files/OptionControlFile/commands/' + req.params.commandName);
8- res.send(optionJSON);
8+ var info = {
9+ status: 'success',
10+ info: optionJSON
11+ };
12+ res.send(info);
913 });
1014
1115 module.exports = router;
--- a/server/express.js
+++ b/server/express.js
@@ -10,11 +10,10 @@ module.exports = function(app) {
1010 app.use(bodyParser.json());
1111 app.use(bodyParser.urlencoded());
1212
13+ app.use(express.static(__dirname + '/../front-end/dist/'))
1314
1415 if(app.get('env') === 'development') {
15- app.use(express.static(__dirname + '/../front-end/dist/'))
1616
1717 } else if(app.get('env') === 'production') {
18- app.use(express.static(__dirname + '../front-end/dist/'))
1918 }
2019 };
--- a/server/routes.js
+++ b/server/routes.js
@@ -23,10 +23,6 @@ module.exports = function(app) {
2323
2424 app.route('/*')
2525 .get(function(req, res) {
26- if(app.get('env') === 'development') {
27- res.sendFile('index.html', { root: path.normalize(__dirname + '/../front-end/dist') });
28- } else if(app.get('env') === 'production') {
29- //res.sendFile('index.html', {root: path.normalize(__dirname + '/../dist')})
30- }
26+ res.sendFile('index.html', { root: path.normalize(__dirname + '/../front-end/dist') });
3127 })
3228 };
Show on old repository browser