Skip to content

Commit bcdfea1

Browse files
committed
Moving webapp to the cloud
1 parent a1ff9ae commit bcdfea1

22 files changed

+78404
-29090
lines changed

client/simple_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "curl_header.h"
66
#include "curl_pair.h"
77

8-
static const std::string AWS_ENDPOINT = "http://52.38.117.152";
8+
static const std::string AWS_ENDPOINT = "http://52.66.121.213";
99

1010
static const std::string RESOURCE_REP_SOCKET_CMD = "get response";
1111
static const std::string RESOURCE_SOCKET_CMD = "discovery response";

cloud/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//Modules & set up =========================================================
2-
var app = require('express')();
2+
var express = require('express');
3+
var app = express();
34
var port = process.env.PORT || 3000;
45
var bodyParser = require('body-parser');
56
var morgan = require('morgan');
@@ -39,6 +40,8 @@ if (process.env.NODE_ENV !== 'test') {
3940
app.use(morgan('dev'));
4041
}
4142

43+
app.use(express.static(__dirname + '/public'));
44+
4245
// set the view engine to ejs
4346
app.set('views', __dirname + '/public');
4447
app.engine('html', require('ejs').renderFile);
@@ -57,11 +60,7 @@ app.use(function(req, res, next) {
5760
});
5861

5962
app.get('/', function(req, res, next) {
60-
return res.status(200).json({
61-
attr: "Qualquer merda",
62-
outraKey: "Outra merda",
63-
array: ["Varias merdas", "1", "2"]
64-
});
63+
return res.render('index.html');
6564
});
6665

6766
app.use('/api/auth/', authRouter());

cloud/package.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "babel-node index.js",
7+
"start": "webpack && babel-node index.js",
88
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive",
99
"test:watch": "npm run test -- --watch"
1010
},
@@ -14,13 +14,21 @@
1414
"devDependencies": {
1515
"babel-cli": "^6.9.0",
1616
"babel-core": "^6.9.1",
17+
"babel-loader": "^6.2.4",
1718
"babel-preset-es2015": "^6.9.0",
19+
"babel-preset-react": "^6.5.0",
1820
"chai": "^3.5.0",
19-
"mocha": "^2.5.3"
21+
"chai-immutable": "^1.6.0",
22+
"jsdom": "^9.2.1",
23+
"mocha": "^2.5.3",
24+
"react-hot-loader": "^1.3.0",
25+
"webpack": "^1.13.1",
26+
"webpack-dev-server": "^1.14.1"
2027
},
2128
"babel": {
2229
"presets": [
23-
"es2015"
30+
"es2015",
31+
"react"
2432
]
2533
},
2634
"dependencies": {
@@ -29,10 +37,22 @@
2937
"chai-immutable": "^1.5.4",
3038
"ejs": "^2.4.2",
3139
"express": "^4.13.4",
32-
"immutable": "^3.8.1",
3340
"jsonwebtoken": "^7.0.0",
3441
"mongoose": "^4.4.20",
3542
"morgan": "^1.7.0",
36-
"socket.io": "^1.4.6"
43+
"socket.io": "^1.4.6",
44+
"classnames": "^2.2.5",
45+
"d3": "^3.5.17",
46+
"immutable": "^3.8.1",
47+
"material-ui": "^0.15.1",
48+
"rd3": "^0.6.3",
49+
"react": "^15.1.0",
50+
"react-d3-basic": "^1.6.11",
51+
"react-dom": "^15.1.0",
52+
"react-redux": "^4.4.5",
53+
"react-router": "^2.0.0",
54+
"react-tap-event-plugin": "^1.0.0",
55+
"redux": "^3.5.2",
56+
"socket.io-client": "^1.4.6"
3757
}
3858
}

0 commit comments

Comments
 (0)