-
-
Save hpssjellis/ebdabfcdc88fe613781e13ccca966ec3 to your computer and use it in GitHub Desktop.
Serve Star Track via phonegap.serve() on Heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- for heroku, replace the CSP in Star Track with this --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com https://api.spotify.com http://*.herokuapp.com 'unsafe-eval' 'unsafe-inline' ws://*.herokuapp.com ws://localhost:3000; style-src 'self' 'unsafe-inline'; media-src *; img-src * data:"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var phonegap = require('phonegap'); | |
phonegap.serve({ | |
port: process.env.PORT || 3000, // optional | |
autoreload: true, // optional | |
localtunnel: false, // optional (no point with Heroku) | |
browser: true | |
}, function(e) { | |
console.log((e) ? e.message : 'server is running'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "startrack-heroku", | |
"description": "PhoneGap Star Track App hosted on Heroku", | |
"version": "0.0.1", | |
"main": "./index.js", | |
"scripts": { | |
"start": "node ./index.js" | |
}, | |
"engines": { | |
"node": ">=0.10.0", | |
"npm": ">=1.2.0" | |
}, | |
"dependencies": { | |
"phonegap": "^6.1.0" | |
}, | |
"devDependencies": {}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment