Skip to content

Commit

Permalink
TRAVIS ● HEROKU
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-a committed Oct 25, 2017
1 parent f7e2ab0 commit e1a3f6b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
language: node_js
node_js: stable
script: yarn build
script:
- yarn build
- yarn add express
deploy:
provider: heroku
api_key:
secure: hDOCZwi6ikrvz7iBchnenvm5HVAccVoZBJe7uH/Mjn2qlOZogRJf9Fm2FmZgHwkH2qDtSpZbGQnaYPrhnhmiwvJha6oIljSFFjaYWcdv0USt3cAGsfXiCRxvq7nYBTyZk/ayWOh6AzH2mkwn6vx6fyafg4Rqvc1mWAckukn01oeCl76whelP7bhsxxUuhZzeOE22EvWLrYfVOForZ6rM/pm2LCbMJD/mUcIdzegrWtuJoy5rkWZivGzvDaGu6C7FXMrQMLG7r/tKd0CjHHJRSU+GvrnFbCOvItM6raso+l2YAFkvqU7Pr+PyRRgU0h/sUaqXWl8+B1aCU3NsBydUWClgn1kUu3Xq3kdJIJSfCCUsDcaFtMrTwpyk7VWZ2Bzr5bkr0aWADyAHwXmgFYaCFFTelpvureIr29L20le9UB3KRBugGOvulMK6/QPHcSGs4+um5VEUGG21umnOj46f+KhP/M0S3fz9FcPmmcTjLPmrVesU5Bfg/mhuiBKRzkhyWAGnI18FYsY/hvKUbV3t7JLrEq1TXkiE7k1Ah50e9vWswZHqTHYzMf/6X9XBb3kwu6SaVAobfeCh/Eyda1unbrpioZ5k6xdQARXWA7M6rQ8LwqZ8W7fFY3ETGwyzNVnC9up7JtiCkWbOROnMMjQyhYjHw7JdaKr16ss5AtqPKls=
app: react-mario
on:
repo: shreyas-a/mario
skip_cleanup: true
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"license": "ISC",
"dependencies": {
"express": "^4.16.2",
"react": "^15.6.2",
"react-dom": "^15.6.1",
"react-router-dom": "^4.2.2"
Expand Down
19 changes: 9 additions & 10 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
var express = require('express');
var express = require("express");
var app = express();
var path = require("path");
var publicPath = __dirname + "/dist/";

app.set('port', (process.env.PORT || 5000));

app.use(express.static(__dirname + '/dist'));


app.get('/', function(request, response) {
response.render('dist/index');
app.get("/", function (req, res) {
res.sendFile(path.join(__dirname + "/dist/index.html"));
});

app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
app.use("/", express.static(publicPath));

app.listen(process.env.PORT || 3000, function () {
console.log("Listening on port " + process.env.PORT || 3000);
});

0 comments on commit e1a3f6b

Please sign in to comment.