Documentation

Web Services

Host dynamic web apps (Express, Django, etc.) at a public URL.

Deployra helps you host web apps written in your favorite language and framework: Node.js with Express, Python with Django—you name it. Deployra builds and deploys your code with every push to your linked Git branch. You can also deploy a prebuilt Docker image.

Every Deployra web service gets a unique deployra.app subdomain, and you can add your own custom domains. Web services can also communicate with your other Deployra services over your private network.

Deploy a template

You can get started on Deployra by deploying one of our basic app templates:

Express
Node.js
Django
Python
Ruby on Rails
Ruby
Phoenix
Elixir

Port binding

Every Deployra web service must bind to a port on host 0.0.0.0 to serve HTTP requests. Deployra forwards inbound requests to your web service at this port (it is not directly reachable via the public internet).

We recommend binding your HTTP server to the port defined by the PORT environment variable. Here's a basic Express example:

app.js
const express = require('express')
const app = express()
const port = process.env.PORT || 4000 

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

The default value of PORT is 3000 for all Deployra web services. You can override this value by setting the environment variable for your service in the Deployra Dashboard.

Connect to your web service

Connecting from the public internet

Your web service is reachable via the public internet at its deployra.app subdomain (along with any custom domains you add).

If you don't want your service to be reachable via the public internet, create aprivate serviceinstead of a web service.

Deployra's load balancer terminates SSL for inbound HTTPS requests, then forwards those requests to your web service over HTTP. If an inbound request uses HTTP, Deployra first redirects it to HTTPS and then terminates SSL for it.

Connecting from your private network

Your web service can communicate with your other Deployra services over your private network. This private network is automatically created when you add services to your Deployra account.

Within your private network, you can reach your services using their internal hostnames, which follow this format:

service-name.service

For example, if you have a web service named "api" and a database service named "db", your api service can connect to the db service using "db.service" as the hostname.