This walkthrough takes you from an empty folder on your computer to a live website on the Domain India App Platform. You'll write a tiny Node.js app, test it locally, and deploy it with a deploy token. No previous deployment experience is needed, and you don't need Git, Docker or an SSH key.
Create three small files (index.js, package.json and a Procfile), run the app locally, then create an app in the client area. In the app's Deploy Tokens tab, create a token and copy the ready-to-run command it shows. Package your folder with tar, run that command, and open your app's address from the Overview tab. The two rules that decide whether it works: listen on PORT, and bind to 0.0.0.0.
If your code is ready and you only need the deploy step, see Deploying with a deploy token. For the overview of how the platform works, see Getting started with the App Platform.
1. What you need
| You need | How to check | If it's missing |
|---|---|---|
| Node.js | node --version | Install a current LTS release from nodejs.org |
| A terminal | Terminal on macOS or Linux, PowerShell on Windows | Already installed |
tar and curl | tar --version and curl --version | Built in on macOS, Linux, and Windows 10 and 11 |
| An App Platform plan | App Platform in the client area menu | See plans, apps and limits |
On Windows, use PowerShell, not the old Command Prompt.
This guide uses Node.js because Node.js apps are detected and built automatically. Python, PHP and other languages also run on the platform, but they need a Dockerfile in your project; the getting-started guide has a minimal Python example.
2. Create the project
mkdir hello-app
cd hello-appCreate three files in that folder.
index.js, the application:
const http = require('http');
// The platform tells your app which port to use.
// On your computer there is no PORT, so fall back to 3000.
const port = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
res.end('<h1>Hello from App Platform</h1><p>My first deployment.</p>');
});
// 0.0.0.0 accepts connections from outside the container.
server.listen(port, '0.0.0.0', () => {
console.log(`Listening on port ${port}`);
});package.json, which tells the platform this is a Node.js project:
{
"name": "hello-app",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node index.js"
}
}Procfile, with no file extension, which says how to start the app:
web: node index.jsThat's the whole application, with no dependencies to install.
3. The two rules that decide whether your app works
Almost every "the build succeeded but my site doesn't load" problem comes down to one of these:
- Listen on the port in
PORT. Never hard-code a port number. - Bind to
0.0.0.0, notlocalhost. An app bound to localhost only accepts connections from inside its own container, so visitors see nothing.
server.listen(3000, 'localhost'); // wrong: unreachable
server.listen(process.env.PORT, '0.0.0.0'); // right4. Run it on your computer first
If it doesn't run locally, it won't run on the platform either.
PORT=3000 node index.jsOn Windows PowerShell:
$env:PORT=3000; node index.jsYou should see Listening on port 3000. Open http://localhost:3000 in your browser and you should see "Hello from App Platform". Stop the server with Ctrl+C.
5. Create the app and a deploy token
- Go to App Platformin your client area menu.
- Click New Appand give it a name. If your plan has room, it's created straight away with nothing more to pay.
- Open the app.Its web address is on the Overview tab.
- Open Access › Deploy Tokensand click Create Token. Name it, for example
laptop. - Copy the ready-to-run commandthe tab shows. It already contains your new token and your app's deploy address.
Only a hash of the token is stored, so it can't be shown again. If you lose it, revoke it and create another.
6. Package and deploy
Move up one level, to the folder that contains hello-app, and package it:
cd ..
tar czf app.tar.gz --exclude=node_modules --exclude=.git -C hello-app .-C hello-app . packages the contents of hello-app, not the folder itself. That matters: the platform expects package.json at the top of the archive.
Now paste and run the command you copied from the Deploy Tokens tab, in the same folder as app.tar.gz. Don't type the command by hand; copying it avoids a wrong address or a leftover placeholder.
The command waits while your app builds, then prints the result. Behind the scenes:
- Your archive is received.
- The platform finds
package.jsonand treats the project as Node.js. - Dependencies are installed and the app is built.
- A health check runs on the new version.
- Traffic switches to it with no downtime.
You can follow the same build output in the Deploys tab.
7. Open your live site
Go to the app's Overview tab and open its address. You should see "Hello from App Platform", served over HTTPS.
8. Change something and deploy again
Edit the message in index.js:
res.end('<h1>Hello from App Platform</h1><p>Updated!</p>');Then repeat step 6: package, then run the same upload command. Refresh your site and the change is live. This is the loop you'll use from now on.
9. If something goes wrong
| What you see | What it means |
|---|---|
Missing Authorization: Bearer … | The Authorization line is missing from the command |
Invalid or expired deploy token (401) | The token is wrong, expired or revoked; the placeholder is still in the command; or the command names a different app |
Upload exceeds 512 MB (413) | Exclude node_modules and large files |
| Build fails | The upload worked; read the build log in the Deploys tab |
| Build succeeds, site doesn't load | Almost always rule 2: bind to 0.0.0.0 and read PORT |
More fixes are in Troubleshooting the App Platform.
10. Next steps
- Settings and secrets: Environment variables
- A database: PostgreSQL database
- Your own domain: Custom domains and SSL
- Deploy from GitHub: Deploying from GitHub
Do I need Git or Docker to deploy my first App Platform app?
No. For a Node.js app you only need Node.js, tar and curl. You package your folder with tar and upload it with the command from your app's Deploy Tokens tab.
Where do I find the deploy command?
Create a token in your app's Deploy Tokens tab. The tab then shows a ready-to-run command with your token and your app's deploy address already filled in.
Can I deploy a Python app the same way?
Yes, with a Dockerfile. Only Node.js is detected automatically, so Python, PHP and other languages need a Dockerfile in the root of the project.
Why does my site not load after a successful build?
Usually the app isn't reading the PORT environment variable or is bound to localhost. Listen on PORT and bind to 0.0.0.0, then deploy again.
How do I update my site after the first deploy?
Package the folder again with tar and run the same upload command. The new version replaces the old one with no downtime.
Ready to go live? Open your App Platform apps, compare App Platform plans, or ask us in a support ticket.
App Platform plans start at 1 app with PostgreSQL, free SSL and custom domains included.
See App Platform plans