Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heroku/node-js-getting-started
Getting Started with Node.js on Heroku.
https://github.com/heroku/node-js-getting-started
express heroku heroku-languages nodejs sample-app
Last synced: about 10 hours ago
JSON representation
Getting Started with Node.js on Heroku.
- Host: GitHub
- URL: https://github.com/heroku/node-js-getting-started
- Owner: heroku
- Created: 2014-05-17T00:39:18.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-01-09T16:02:23.000Z (13 days ago)
- Last Synced: 2025-01-15T04:32:10.185Z (7 days ago)
- Topics: express, heroku, heroku-languages, nodejs, sample-app
- Language: EJS
- Homepage: https://devcenter.heroku.com/articles/getting-started-with-nodejs
- Size: 373 KB
- Stars: 1,080
- Watchers: 111
- Forks: 3,754
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# node-js-getting-started
A barebones Node.js app using [Express](https://expressjs.com/).
This application supports the tutorials for both the [Cedar and Fir generations](https://devcenter.heroku.com/articles/generations) of the Heroku platform. You can check them out here:
* [Getting Started on Heroku with Node.js](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
* [Getting Started on Heroku Fir with Node.js](https://devcenter.heroku.com/articles/getting-started-with-nodejs-fir)## Running Locally
Make sure you have [Node.js](http://nodejs.org/) and the [Heroku CLI](https://cli.heroku.com/) installed.
```sh
$ git clone https://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:5006](http://localhost:5006/).
## Deploying to Heroku
Using resources for this example app counts towards your usage. [Delete your app](https://devcenter.heroku.com/articles/heroku-cli-commands#heroku-apps-destroy) and [database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) as soon as you are done experimenting to control costs.
### Deploy on [Cedar][cedar]
By default, apps use Eco dynos on [Cedar][cedar] if you are subscribed to Eco. Otherwise, it defaults to Basic dynos. The
Eco dynos plan is shared across all Eco dynos in your account and is recommended if you plan on deploying many small apps
to Heroku. Learn more about our low-cost plans [here](https://blog.heroku.com/new-low-cost-plans).Eligible students can apply for platform credits through our new [Heroku for GitHub Students program](https://blog.heroku.com/github-student-developer-program).
```
$ heroku create
$ git push heroku main
$ heroku open
```### Deploy on [Fir][fir]
By default, apps on [Fir][fir] use 1X-Classic dynos. To create an app on [Fir][fir] you'll need to
[create a private space](https://devcenter.heroku.com/articles/working-with-private-spaces#create-a-private-space)
first.```
$ heroku spaces:create --team --generation fir
$ heroku create --space
$ git push heroku main
$ heroku open
```## Documentation
For more information about using Node.js on Heroku, see these Dev Center articles:
- [Getting Started on Heroku with Node.js](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
- [Getting Started on Heroku Fir with Node.js](https://devcenter.heroku.com/articles/getting-started-with-nodejs-fir)
- [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)[cedar]: https://devcenter.heroku.com/articles/generations#cedar
[fir]: https://devcenter.heroku.com/articles/generations#fir