Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylanon/heroku-node-js-getting-started
https://github.com/dylanon/heroku-node-js-getting-started
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dylanon/heroku-node-js-getting-started
- Owner: dylanon
- Created: 2018-01-31T17:40:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T17:52:56.000Z (almost 7 years ago)
- Last Synced: 2024-11-04T08:42:08.507Z (2 months ago)
- Language: HTML
- Size: 237 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# heroku-node-js-getting-started
A barebones Node.js app using [Express 4](http://expressjs.com/).
Created from Heroku's starter repo, and built upon while following along with [Getting Started with Node on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs) article - check it out.
## Routes
- ```/``` (root)
- Displays landing page for *Getting Started with Node on Heroku*
- ```/cool```
- Displays a [cool ascii face](https://www.npmjs.com/package/cool-ascii-faces)
- ```/times```
- Displays number from 0 to n - 1, where n is a number provided to the application as an environment variable (Heroku config var)
- ```/db```
- Displays a list of ids and names retrieved from an example Postgres database## Running Locally
Make sure you have [Node.js](http://nodejs.org/) and the [Heroku CLI](https://cli.heroku.com/) installed.
```sh
$ git clone [email protected]: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)