Skip to content

Commit 68d0cfa

Browse files
committed
improve template
1 parent 59c45f2 commit 68d0cfa

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

server/client/src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import reduxThunk from 'redux-thunk';
88
import App from './components/App';
99
import reducers from './reducers';
1010

11+
// Development only axios helpers!
12+
import axios from 'axios';
13+
window.axios = axios;
14+
1115
const store = createStore(reducers, {}, applyMiddleware(reduxThunk));
1216

1317
ReactDOM.render(

server/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require('./models/User');
88
require('./models/Survey');
99
require('./services/passport');
1010

11+
mongoose.Promise = global.Promise;
1112
mongoose.connect(keys.mongoURI);
1213

1314
const app = express();
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
module.exports = survey => {
2-
return '<div>' + survey.body + '</div>';
2+
return `
3+
<html>
4+
<body>
5+
<div style="text-align: center;">
6+
<h3>I'd like your input!</h3>
7+
<p>Please answer the following question:</p>
8+
<p>${survey.body}</p>
9+
<div>
10+
<a href="http://localhost:3000">Yes</a>
11+
</div>
12+
<div>
13+
<a href="http://localhost:3000">No</a>
14+
</div>
15+
</div>
16+
</body>
17+
</html>
18+
`;
319
};

0 commit comments

Comments
 (0)