Skip to content

Commit

Permalink
watson-dev-cloud added to package json, cool added to package json an…
Browse files Browse the repository at this point in the history
…d required for heroku
  • Loading branch information
TimCrane1 committed Jul 14, 2016
1 parent 796dff6 commit e662181
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "good-news",
"version": "1.0.0",
"repository": "https://github.com/GoodNews-MKS-39/Greenfield",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/GoodNews-MKS-39/Greenfield.git"
},
"description": "This is a repo for MKS-39 students' Greenfield project.",
"main": "index.js",
"scripts": {
"start": "nodemon ./server/main.js --ignore client/",
Expand All @@ -17,12 +20,20 @@
"babelify": "^7.3.0",
"body-parser": "^1.15.2",
"browserify-middleware": "^7.0.0",
"cool-ascii-faces": "1.3.4",
"es6-promise": "^3.2.1",
"express": "^4.13.4",
"isomorphic-fetch": "^2.2.1",
"nodemon": "^1.9.2",
"promised-mongo": "^1.2.0",
"react": "^15.1.0",
"react-dom": "^15.1.0"
}
"react-dom": "^15.1.0",
"watson-developer-cloud": "^1.12.2"
},
"bugs": {
"url": "https://github.com/GoodNews-MKS-39/Greenfield/issues"
},
"homepage": "https://github.com/GoodNews-MKS-39/Greenfield#readme",
"devDependencies": {},
"keywords": []
}
7 changes: 6 additions & 1 deletion server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ var watson = require('./apiModels/watson');
var news = require('./apiModels/news');
var app = express();
var Article = require('./apiModels/articles');
var bodyParser = require('body-parser')
var bodyParser = require('body-parser');
var cool = require('cool-ascii-faces');

app.use(express.static(path.join(__dirname, "../client/public")));
app.use(bodyParser.json());
Expand All @@ -16,6 +17,10 @@ app.get('/app-bundle.js',
})
);

app.get('/cool', function(request, response) {
response.send(cool());
});

app.get('/articles', function(req, res){
Article.all().then(function(articles){
res.status(200).send(articles);
Expand Down

0 comments on commit e662181

Please sign in to comment.