Skip to content

Instantly share code, notes, and snippets.

@hpssjellis
Forked from devgeeks/Procfile
Created April 24, 2016 20:47
Show Gist options
  • Save hpssjellis/ebdabfcdc88fe613781e13ccca966ec3 to your computer and use it in GitHub Desktop.
Save hpssjellis/ebdabfcdc88fe613781e13ccca966ec3 to your computer and use it in GitHub Desktop.
Serve Star Track via phonegap.serve() on Heroku
<!-- 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:">
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');
});
{
"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": {},
}
web: npm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment