Skip to documentation
Documentation menu · Deploy your first app

Get started

Deploy your first app

Publish a small Node.js app and verify its URL without setting up a server yourself.

On this page

Before you start

The goal is a URL that returns Hello DLEZ. You need a Console account, permission to create a project and source on GitHub or in a ZIP. Check the plan and balance before creating resources.

For an existing app, use its README to identify build/start commands and ports. Otherwise create the following two files in a folder. Save the first block below as package.json. The example has no dependencies outside Node.js.

{
  "name": "hello-dlez",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "node --check server.js",
    "start": "node server.js"
  }
}

server.js

Run npm start in that folder using Node.js, then open http://localhost:3000. You should see Hello DLEZ. Put both files at the repository or ZIP root, without .env, passwords or node_modules. This deployment example has no business logic or database.

import { createServer } from "node:http";
const port = Number(process.env.PORT || 3000);
createServer((_request, response) => {
  response.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
  response.end("Hello DLEZ");
}).listen(port, "0.0.0.0", () => console.log("Listening on port", port));

Deploy step by step

  1. Open Projects, create a project such as hello-dlez and open Flash Deploy.
  2. Connect GitHub and select the repository and branch, or upload the ZIP. Confirm it is the source you tested locally.
  3. Choose the appropriate Node.js template. Check the draft/build configuration against npm run build and npm start for this example.
  4. Set the public port to 3000 and PORT=3000. This example does not require MySQL or Redis. Choose CPU/RAM and review the displayed cost.
  5. Deploy and read build logs, then runtime logs. Look for Listening on port 3000. If it fails, read the first error before retrying.
  6. Open the URL shown in the project. It should return Hello DLEZ. Verify it again in a private browser window.
  7. Change the response text, update the GitHub/ZIP source and deploy again. Verify the new text and release history.

Using your own application

Add only variables your code reads. This sample only uses PORT. Node.js servers, Next.js and static frontends have different build/start requirements; do not use a development server as your production start command.