+
+ ${data.item.name}
+ ${data.item.artists[0].name}
+ ${data.is_playing ? 'Playing' : 'Paused'}
+
+
+
+ diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..1da0cd6 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node index.js diff --git a/README.md b/README.md new file mode 100644 index 0000000..0567cf5 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# node-js-getting-started + +A barebones Node.js app using [Express 4](http://expressjs.com/). + +This application supports the [Getting Started with Node on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs) article - check it out. + +## Running Locally + +Make sure you have [Node.js](http://nodejs.org/) and the [Heroku CLI](https://cli.heroku.com/) installed. + +```sh +$ git clone git@github.com:heroku/node-js-getting-started.git # or clone your own fork +$ cd node-js-getting-started +$ npm install +$ npm start +``` + +Your app should now be running on [localhost:5000](http://localhost:5000/). + +## Deploying to Heroku + +``` +$ heroku create +$ git push heroku master +$ heroku open +``` +or + +[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) + +## Documentation + +For more information about using Node.js on Heroku, see these Dev Center articles: + +- [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs) +- [Heroku Node.js Support](https://devcenter.heroku.com/articles/nodejs-support) +- [Node.js on Heroku](https://devcenter.heroku.com/categories/nodejs) +- [Best Practices for Node.js Development](https://devcenter.heroku.com/articles/node-best-practices) +- [Using WebSockets on Heroku with Node.js](https://devcenter.heroku.com/articles/node-websockets) diff --git a/app.js b/app.js deleted file mode 100644 index 0b0c408..0000000 --- a/app.js +++ /dev/null @@ -1,8 +0,0 @@ -var express = require('express') -var app = express() - -app.use(express.static('public')) - -app.listen(3000, function () { - console.log('Example app listening on port 3000!') -}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..74d9743 --- /dev/null +++ b/app.json @@ -0,0 +1,8 @@ +{ + "name": "Start on Heroku: Node.js", + "description": "A barebones Node.js app using Express 4", + "repository": "https://github.com/heroku/node-js-getting-started", + "logo": "http://node-js-sample.herokuapp.com/node.svg", + "keywords": ["node", "express", "heroku"], + "image": "heroku/nodejs" +} diff --git a/example/index.html b/example/index.html new file mode 100644 index 0000000..6f8f3c0 --- /dev/null +++ b/example/index.html @@ -0,0 +1,16 @@ + +
+