GoDaddy Node.js Hosting Help

Deploy your AI-created app with GoDaddy Node.js Hosting

Deploy your Node.js app faster and easier with GoDaddy Node.js Hosting. Update your app, upload the files and then publish.

Note: GoDaddy Node.js Hosting is currently in beta. Features and functionality may change as it continually updates.
  1. If you haven't yet, go to your AI coding assistant (Cursor, Replit, Claude or others) and create your app.
  2. Copy the prompt below and paste it into your AI coding assistant. This updates your app to better meet GoDaddy Node.js Hosting's requirements.
        I need you to adapt my Node.js project so it can be deployed on a hosting platform that has the following requirements. Go through every requirement, check whether my project already satisfies it, and make the minimum changes needed so it does. Do NOT remove any existing functionality.
    
    ## Requirements
    
    ### 1. package.json
    The root of the project must contain a valid `package.json` with at least these fields:
    - `"name"` – the application name
    - `"version"` – a semver version string (e.g. "1.0.0")
    - `"main"` – the entry-point file (e.g. "server.js" or "index.js")
    
    ### 2. Build & Start scripts
    `package.json` must define these npm scripts:
    - `"build"` – compiles / bundles the app (can be a no-op like `"echo build"` if nothing needs compiling)
    - `"start"` – starts the production server (e.g. `"node server.js"`)
    
    ### 3. Port binding
    The application must listen on the port provided by the `PORT` environment variable instead of a hard-coded port. For example:
    ```js
    const port = process.env.PORT || 3000;
    app.listen(port);
    ```
    
    ### 4. Dependencies
    All runtime dependencies must be listed under `dependencies` in `package.json`. The `node_modules` folder must NOT be included in the upload — the platform runs `npm install` automatically.
    
    ### 5. Environment variables
    Any secrets, API keys, or external URLs should be read from `process.env.VARIABLE_NAME`. Do not hard-code sensitive values.
    
    ### 6. Vite apps (if applicable)
    If the project uses Vite, the platform will automatically update the allowed-hosts configuration. No manual changes are needed for Vite, but make sure the dev and preview servers still respect `process.env.PORT`.
    
    ### 7. File-size limit
    The resulting zip must stay under 100 MB. Ensure `node_modules`, build caches, and other large generated directories are excluded.
    
    ## What to do
    1. Audit the project against every requirement above.
    2. Apply the smallest set of changes that makes the project compliant.
    3. List every change you made and why.
        
  3. If you plan to have ongoing updates, download CLAUDE.md and place the file in the root folder of your app's repository.
    # CLAUDE.md — Node.js Hosting
    
    This project is built to deploy on Node.js Hosting, a managed Node.js hosting platform. Use this file as context when helping build, debug, or prepare this app for deployment.
    
    ## Platform Overview
    
    Node.js Hosting is a managed Node.js PaaS that supports Node.js applications and static sites. Customers upload their project folder through the GoDaddy interface — no Docker, no CI/CD pipelines, no infrastructure config needed. The platform handles SSL, CDN, and server-side compute automatically.
    
    ## Deployment Flow
    
    1. Customer uploads their project folder via the Node.js Hosting UI
    2. The platform installs dependencies and builds the app
    3. The app is deployed to a private preview environment (requires GoDaddy auth to view)
    4. Once ready, the customer can publish to production and connect a custom domain
    
    ## Requirements
    
    ### package.json
    
    Every project must have a valid `package.json` in the root directory with a `start` script. This is how the platform knows how to run the app.
    
    ```json
    {
      "name": "my-app",
      "version": "1.0.0",
      "scripts": {
        "start": "node server.js"
      },
      "dependencies": {
        "express": "^4.18.0"
      }
    }
    ```
    
    The platform runs `npm install` followed by `npm start` to boot the application.
    
    ### Entry Point
    
    The app needs a clear entry point referenced by the `start` script. Common patterns:
    
    - `node server.js`
    - `node index.js`
    - `node app.js`
    - `next start` (for Next.js apps)
    
    ### Port Binding
    
    The app must listen on the port provided by the `PORT` environment variable. Do not hardcode a port.
    
    ```javascript
    const port = process.env.PORT || 3000;
    app.listen(port, () => {
      console.log(\`Server running on port \${port}\`);
    });
    ```
    
    ### Static Sites
    
    For static sites with no server-side logic, include a simple server that serves the static files:
    
    ```javascript
    const express = require('express');
    const path = require('path');
    const app = express();
    const port = process.env.PORT || 3000;
    
    app.use(express.static(path.join(__dirname, 'public')));
    
    app.get('*', (req, res) => {
      res.sendFile(path.join(__dirname, 'public', 'index.html'));
    });
    
    app.listen(port);
    ```
    
    ## Supported Frameworks
    
    Node.js Hosting supports any Node.js application or framework that can run via `npm start`. This includes but is not limited to:
    
    - Express.js
    - Next.js
    - Fastify
    - Nuxt.js
    - Remix
    - Nest.js
    - Hono
    - Koa
    - Static sites served via a Node.js server
    
    If your framework produces a production build and can start via a `"start"` script, it will work on Node.js Hosting.
    
    ## Single Application Per Upload
    
    Node.js Hosting expects a single application per upload. Monorepos and multi-app setups are not supported unless a single `npm start` command at the root boots everything the app needs.
    
    If your project is a monorepo, extract the specific app you want to deploy into its own folder with its own `package.json` and upload that folder instead.
    
    For example, if your repo has a structure like `packages/api` and `packages/web`, upload just `packages/web` as a standalone project with its own complete `package.json` and `start` script.
    
    ## Project Structure
    
    The platform is flexible with structure. As long as the root contains a valid `package.json` with a `start` script, the app will deploy. A typical structure looks like:
    
    ```
    my-app/
    ├── package.json        # Required — must include "start" script
    ├── server.js           # Entry point (or index.js, app.js, etc.)
    ├── public/             # Static assets (if applicable)
    │   ├── index.html
    │   ├── styles.css
    │   └── script.js
    ├── routes/             # API routes (if applicable)
    ├── views/              # Templates (if applicable)
    ├── .env.example        # Document required env vars (do not upload .env)
    └── CLAUDE.md           # This file
    ```
    
    ## Environment Variables
    
    - `PORT` is provided automatically by the platform. Always use `process.env.PORT`.
    - Any additional environment variables needed by the app can be configured through the Node.js Hosting UI after upload.
    - Never commit secrets or `.env` files in the upload folder.
    
    ## What the Platform Handles
    
    You do not need to configure or worry about:
    
    - SSL/TLS certificates — provisioned automatically
    - CDN — included out of the box
    - Process management — the platform manages restarts and uptime
    - Server infrastructure — fully managed compute
    
    ## Deploying from AI Coding Tools
    
    Many customers build their apps using AI-powered tools like Replit, Lovable, Bolt, Cursor, or Claude. These apps can be deployed on Node.js Hosting, but often need small adjustments before they're ready.
    
    ### How to get your code onto Node.js Hosting
    
    1. Export or download your project as a zip from the AI tool
    2. Unzip the folder locally
    3. Check and fix the common issues below
    4. Upload the folder through the Node.js Hosting UI
    
    ### Common issues and fixes
    
    **Missing or incomplete `package.json`**
    Some AI tools don't generate a complete `package.json`. Make sure yours exists in the root and includes a `"start"` script. If it's missing, create one:
    
    ```json
    {
      "name": "my-app",
      "version": "1.0.0",
      "scripts": {
        "start": "node server.js"
      },
      "dependencies": {}
    }
    ```
    
    Then run `npm install` locally to generate the correct dependencies.
    
    **Hardcoded ports**
    AI tools often hardcode a port like `3000` or `8080`. Replace any hardcoded port with `process.env.PORT`:
    
    ```javascript
    // Before (common in AI-generated code)
    app.listen(3000);
    
    // After (ready for Node.js Hosting)
    app.listen(process.env.PORT || 3000);
    ```
    
    **Dependencies in the wrong place**
    AI tools sometimes put production dependencies under `"devDependencies"`. Move anything the app needs at runtime into `"dependencies"`.
    
    **Missing entry point**
    Make sure the file referenced in your `"start"` script actually exists. AI tools sometimes generate a `main.js` but the start script points to `index.js`, or vice versa.
    
    **Replit-specific files**
    Replit projects often include `.replit` and `replit.nix` config files. These are not needed and can be removed before upload. Focus on having a clean `package.json` with the correct `"start"` script.
    
    **Lovable / Bolt exports**
    These tools often export frontend-only apps with no server. If your export doesn't include a server file, add a simple one to serve your static files:
    
    ```javascript
    const express = require('express');
    const path = require('path');
    const app = express();
    const port = process.env.PORT || 3000;
    
    app.use(express.static(path.join(__dirname, 'dist')));
    
    app.get('*', (req, res) => {
      res.sendFile(path.join(__dirname, 'dist', 'index.html'));
    });
    
    app.listen(port);
    ```
    
    Make sure to add `express` to your dependencies: `npm install express --save`
    
    ### Quick validation
    
    Before uploading, run this locally to confirm everything works:
    
    ```bash
    npm install
    npm start
    ```
    
    If your app starts and is accessible at `http://localhost:3000` (or whatever port), it's ready for Node.js Hosting.
    
    ## Framework Setup Examples
    
    ### Express.js
    Ensure `express` is in `dependencies` (not `devDependencies`) and the `start` script points to your server file.
    
    ### Next.js
    Use `next build` as a `build` script and `next start` as the `start` script:
    
    ```json
    {
      "scripts": {
        "build": "next build",
        "start": "next start"
      }
    }
    ```
    
    Next.js apps work out of the box with server-side rendering, API routes, and static generation.
    
    ### Nuxt.js
    Similar to Next.js — build then start:
    
    ```json
    {
      "scripts": {
        "build": "nuxt build",
        "start": "node .output/server/index.mjs"
      }
    }
    ```
    
    ### Remix
    ```json
    {
      "scripts": {
        "build": "remix build",
        "start": "remix-serve build"
      }
    }
    ```
    
    ### Fastify
    Same pattern as Express — bind to `process.env.PORT` and use `0.0.0.0` as the host:
    
    ```javascript
    fastify.listen({ port: process.env.PORT || 3000, host: '0.0.0.0' });
    ```
    
    ### Nest.js
    ```json
    {
      "scripts": {
        "build": "nest build",
        "start": "node dist/main"
      }
    }
    ```
    
    ## Pre-Upload Checklist
    
    Before uploading to Node.js Hosting, verify:
    
    - [ ] `package.json` exists in the root directory
    - [ ] `package.json` has a `"start"` script
    - [ ] All production dependencies are in `"dependencies"` (not `"devDependencies"`)
    - [ ] App listens on `process.env.PORT`
    - [ ] No hardcoded ports, secrets, or local file paths
    - [ ] App runs locally with `npm install && npm start`
    - [ ] If using a build step, `"build"` script is defined in `package.json`
    
    ## Troubleshooting
    
    ### App won't start
    - Check that `"start"` script exists in `package.json`
    - Make sure the entry point file referenced in `"start"` actually exists
    - Verify all dependencies are listed under `"dependencies"`
    
    ### Port errors
    - Never hardcode a port number — always use `process.env.PORT`
    - For frameworks that need a host, bind to `0.0.0.0` not `localhost`
    
    ### Missing modules
    - Ensure all required packages are in `"dependencies"`, not `"devDependencies"`
    - The platform runs `npm install --production` so dev dependencies are not installed
    
    ### Build failures
    - If the app needs a build step (TypeScript, Next.js, etc.), add a `"build"` script
    - Check that build output paths match what the `"start"` script expects
    
    ## Getting Help
    
    If you run into issues deploying, reach out through the Node.js Hosting interface or contact GoDaddy support.
    
    
  4. Download your app from your AI coding assistant to your computer.
  5. Zip your app files on your Windows or Mac computer.
  6. Go to GoDaddy Node.js Hosting, select Browse files, upload your zip file, select I'm not a robot and then select Deploy.
  7. Under URL, select the link to view your app in a browser.
  8. (Optional) Manage your app by selecting:
    • Upload New Code: Add more code files
    • Settings: Manage secrets, change your domain or delete your app
    • Restart Preview App: Restart your preview.
    • Runtime Logs: View your app logs.
  9. When you're ready to go live, select Publish Now.

To manage your projects, go to GoDaddy Node.js Hosting and in the top-right, select My Apps.

More info

Share this article