DEV Community

Bruno
Bruno

Posted on

6 1

Full Stack setup from scratch - Node.js, Express.js, React.js and Lowdb (Part 3)

  1. Setup
  2. Filter pages to print
  3. Deploy to Heroku

To deploy to Heroku, you have create an account at Heroku.

Heroku is a cloud platform that lets companies build, deliver, monitor and scale apps — we're the fastest way to go from idea to URL, bypassing all those infrastructure headaches.

After creating and logging in into your account, download and install the Heroku cli. Then, open your terminal and type the following command to login Heroku services:

heroku login

Next, create your app, typing:

heroku create filter-pdf

Then, in package.json in the root project, add the script:

"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix front && npm run build --prefix front"

Now, commit that change and push it to Heroku:

git push heroku master

If you want deploy other branch, so:

git push heroku otherBranch:master

Then, go to the heroku dashboard page, access your app and check the app's overview section. That is where Heroku will display some building logs.

Once you get a "Deployed" message, you can click on the "Open app" button and see the application running.

I hope this tutorial helps. Thanks.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
sanconley profile image
sanconley

Heroku is ephemeral though. The DB is wiped the second the dyno powers down.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay