A minimal Angular starter you can deploy on Cloudways Velocity — managed Node.js hosting with NGINX, PM2, SSL, and Git-based deploys — or any other host.
Includes a Cloudways-branded sample home page so you can confirm the deploy worked, then replace it with your own site.
Velocity supports client-side frameworks such as Angular, so you do not need Apache .htaccess, mod_proxy, or manual SSH/PM2 setup used on classic Cloudways Flexible servers.
| File / folder | Purpose |
|---|---|
src/app/ |
Cloudways-branded sample home page |
public/ |
Logo, favicon, and hero assets |
package.json |
Build + start scripts for Velocity (app port 3000) |
angular.json |
Angular project config (cli.analytics: false) |
Build and start commands used by Velocity:
npm run build # → NG_CLI_ANALYTICS=false ng build
npm start # → serve the browser build on port 3000- A Cloudways account with Velocity access
- This repository pushed to GitHub (or another Git provider Velocity can connect to)
- A domain (optional at first; Velocity provides a default URL)
- Node.js 20.x, 22.x, or 24.x LTS (selectable per app in Velocity)
Velocity has no interactive terminal for CLI prompts. Set this in the Velocity app Environment Variables panel so Angular CLI never asks about analytics during build/start:
| Variable | Value | Notes |
|---|---|---|
NG_CLI_ANALYTICS |
false |
Disables Angular CLI analytics prompts and telemetry |
NG_CLI_ANALYTICS=falseThis template also sets NG_CLI_ANALYTICS=false inside npm scripts and "analytics": false in angular.json, but you should still add the env var in Velocity so non-interactive deploys stay quiet even if scripts change.
Optional:
| Variable | Example | Notes |
|---|---|---|
NODE_ENV |
production |
Standard production flag |
PORT |
3000 |
Velocity’s app port (keep 3000 unless Cloudways docs say otherwise) |
git clone https://github.com/YOUR_USERNAME/cloudways-angular-template.git
cd cloudways-angular-template
npm install
npm run devOpen http://localhost:4200 to see the Cloudways-branded sample home page.
| Command | Description |
|---|---|
npm run dev |
Local Angular dev server (ng serve, port 4200) |
npm run build |
Production browser build → dist/cloudways-angular-template/browser/ |
npm start |
Serve the production build on port 3000 (Velocity-style) |
npm run preview |
Preview the production build locally on port 4200 |
Local smoke test of the Velocity start command:
npm run build
NG_CLI_ANALYTICS=false npm start
# open http://localhost:3000git clone https://github.com/YOUR_USERNAME/cloudways-angular-template.git
cd cloudways-angular-template
git remote -v # confirm origin points at your GitHub repo
git push -u origin mainVelocity deploys from Git — keep package.json and package-lock.json on the branch you will connect (usually main).
- Open the Cloudways platform and go to Velocity.
- Click Get Started / create a new application.
- Connect your Git provider and select this repository.
- Choose branch
main(or your deploy branch). - Set framework to Angular (or Node.js / custom if Angular is not listed).
- Select Node.js 20.x, 22.x, or 24.x.
- Confirm build and start commands:
- Build:
npm run build - Start:
npm start
- Build:
- Add environment variables (see above), especially
NG_CLI_ANALYTICS=false. - Pick a plan size and deploy.
Velocity handles NGINX reverse proxy, PM2 process management, OS patching, and SSL for the default hostname. No .htaccess or Apache proxy setup is required.
- In Velocity, open your application → Domains (or equivalent).
- Add your domain / subdomain.
- Point DNS (A/CNAME) as instructed by Cloudways.
- Wait for SSL provisioning.
- Redeploy if needed, then open the custom domain.
- Open your Velocity app URL (or custom domain).
- You should see the Cloudways-branded sample home page stating this is a sample app from Cloudways.
- In Velocity logs, confirm the process is running and listening on port
3000.
This template is host-agnostic. Build once, then either run npm start (Node static server on 3000) or publish the browser folder as static files.
| Platform | Notes |
|---|---|
| Netlify / Vercel / Cloudflare Pages | Build: npm run build; publish dist/cloudways-angular-template/browser |
| GitHub Pages | Build in CI and publish dist/cloudways-angular-template/browser/ |
| Nginx / VPS / Docker | Serve that folder as the document root, or run npm start behind a reverse proxy |
.
├── public/ # Static assets (copied into the browser build)
│ ├── cloudways-logo.svg
│ ├── favicon.ico
│ ├── favicon.svg
│ └── hero-cloud.svg
├── src/
│ ├── app/ # Root component (sample home page)
│ ├── index.html # HTML shell + fonts
│ ├── main.ts # Bootstrap
│ └── styles.css # Cloudways brand tokens
├── angular.json # Angular config (analytics disabled)
└── package.json # Velocity build / start scripts
- Edit
src/app/app.component.html(and.css) to replace the sample home page. - Add routes in
src/app/app.routes.tsand create components undersrc/app/. - Put images and other static files in
public/. - Update site metadata in
src/index.html.
| Symptom | What to check |
|---|---|
| Build hangs on analytics prompt | Set NG_CLI_ANALYTICS=false in Velocity Environment Variables |
| App won’t start | Velocity build logs; Node ≥ 20; npm run build succeeds |
| Blank page / 502 | Process must listen on 3000; confirm Start is npm start |
| CSS/images 404 | Confirm the build output under dist/cloudways-angular-template/browser/ was produced |
| Deep links 404 | npm start uses SPA fallback (serve -s); confirm start command was not changed |
| Stale UI after push | Trigger a Velocity redeploy after the new commit lands on the connected branch |
MIT — see LICENSE.
PRs welcome. Fork, branch, and open a pull request.
Use this repo as a GitHub template: click Use this template on GitHub to create your own project from this starter.