Skip to content

v1 Deployment

Jonathan Sharpe edited this page Aug 24, 2024 · 1 revision

Render

  1. Click the "Deploy to Render" button at the top of the README and log in using GitHub when prompted.

  2. Fill in a service group name for your application and then click "Apply".

  3. Once it has deployed successfully, click the "managed resources" link to view the application details.

Heroku

  1. Click the "Deploy to Heroku" button and create a Heroku account when prompted.

  2. Fill in the name of the application, select the region you want and then click "Deploy App".

  3. Once it has deployed successfully, click the "Manage app" button to view the application details.

  4. Go to the "Deploy" tab, select "Connect to GitHub" and choose your repo.

  5. Click "Enable automatic deploys".

Whenever you commit to master (or e.g. merge a [pull request]) it will get automatically deployed!

Cloud Foundry

You can deploy the production build of the app to Cloud Foundry, e.g. signing up for a free account with https://www.ibm.com/cloud/cloud-foundry.

  • Install the [Cloud Foundry CLI](https://github.com/cloudfoundry/cli) and use cf login to connect to your account

  • Add the following command to the "scripts" object in the package.json:

    "cloudfoundry": "npm run build && cf push",

Now you can npm run cloudfoundry to deploy the app. You’ll see something like:

name:                starter-kit-cf
requested state:     started
isolation segment:   iso-01
routes:              <url>
last uploaded:       <date>
stack:               cflinuxfs3
buildpacks:          nodejs

You can visit the URL in routes to see the app.

Netlify

You can easily deploy the built front-end to Netlify, just globally install the Netlify CLI:

npm install -g netlify-cli

add the following commands into the "scripts" object in the package.json:

  "prenetlify": "npm run cleanup && npm run build:client",
  "netlify": "netlify deploy --prod --dir ./dist/static",

and add the following line to .gitignore:

.netlify/

Now you can use npm run netlify to rebuild the front-end and deploy it to Netlify. However note that Netlify can’t host the backend, so any pages that rely on making requests to your Express server won’t work.

[pull request]: https://help.github.com/en/articles/about-pull-requests
Clone this wiki locally