Giter Club home page Giter Club logo

render-express-deployment's Introduction

Express Deployment with Render

deploy

This lesson will walk you through the steps to deploy a Node Express app with Render. We will walk through all of the necessary steps from start to finish.

Objectives

  • Sign Up for a Render account and connect your GitHub account
  • Set up a new Web Service from the Render Dashboard
  • Adjust the app settings to properly build and deploy your app
  • Deploy

Why deploy with Render?

Render removes much of the difficulties of deployment by connecting directly to your GitHub repository. In addition, it's one of the few services that will allow you to deploy an Express back-end server for free.

They brand themselves as "Your Fastest Path to Production". I think you'll find in this walkthrough that they deliver on that promise.

Sign Up

If you have never signed up with Render.com before...

To start, you'll need to head over to Render.com and sign up for an account. Feel free to sign up with your GitHub or Google account, or to make an account directly with Render.

Create a New Web Service

From the Render dashboard, you'll see that there are several different types of apps that you can deploy.

Under Web Services, select New Web Service.

The next page will ask how you would like to deploy your web service.

Select Build and deploy from a Git repository and click "Next".

If you have not connected your GitHub account, do so now.

The next page will prompt you to connect one of your repositories. You may see your repo in the list, or you can search for it. Select the repo you want to deploy and click "Connect".

Adjust the App Settings

Render should automatically detect that your app is using Node, and will autofill some of the fields in this section for you.

The only fields we will need to change are:

  • Name (optional)
  • Build Command
  • Start Command
  • Instance Type
  • Environment Variables

The rest can be left how Render autofilled them.

Whatever Name you select for your app will determine the URL that is generated, like this:

Name: expressdeployment

Will produce...

https://expressdeployment.onrender.com

For the Build Command, put the following:

npm install

For the Start Command, you'll need to put the command that you run to start your Express server. Possibly:

npm run dev

For the Instance Type, make sure you select "Free". This will not require you to enter credit card information, and is great for simple hobby projects.

Under Environment Variables, you will need to add your Database URI and it's associated env variable. If you have any other environment variables that your app uses, be sure and add these here as well.

Once you've filled out all of the required fields, click "Create Web Service".

Deploy Your App

On the next page, Render will automatically begin deploying your app. You can view the log for errors, and once the deployment is complete, you should see:

==> Your site is live ๐ŸŽ‰

Your app is deployed!

Recap

In this walkthrough, you successfully deployed your Node Express app to Render.

Any time you make changes to your project that you want reflected on your deployed version, just commit your changes and push up to your main branch. Render will automatically re-deploy the app!

Resources

render-express-deployment's People

Contributors

nobodyslackey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.