此页面还没有简体中文版,暂以英文显示。

How to deploy an Angular app for free, from dist/browser

Quick answer

To deploy an Angular app for free, run ng build and drop the browser folder inside dist/<project-name> on Convika's upload screen. Convika serves it at its own address, such as my-app.convika.page, so base href stays '/', lazy-loaded chunks load from their own paths, and every router path opens on reload with no rewrite rule. Sign up free, with no credit card and no Git.

Deploy my Angular app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.

On this page

To deploy an Angular app for free, run ng build and drop the browser folder inside dist/<project-name> on Convika's upload screen. Convika serves it as a site at its own address, such as my-app.convika.page, so <base href="/"> stays as it is, the lazy-loaded chunks load from their own paths, and /settings opens the app on that route when someone reloads. No rewrite rule, no Git, and no credit card.

What to build, and the folder to drop

ng build compiles the app for production and writes it to dist/<project-name>. The browser folder in it holds index.html, the JavaScript chunks, the CSS, and your assets: that folder is the app, and it is the only thing you upload.

Your projectBuild commandFolder to drop
Angular 17 or later (application builder)ng builddist/<project-name>/browser
Angular with npm scriptsnpm run builddist/<project-name>/browser

ng build uses the production configuration by default.

Deploy an Angular app in 5 steps

1. Build the app

In the project folder, run:

npm install
ng build

The CLI lists the chunks with their sizes and prints "Output location:" with the folder.

2. Sign up free

Sign up free, with no credit card. Convika opens the upload screen, Put your page or file online.

3. Drop the browser folder

Drop browser from dist/<project-name> on Drop a file or folder here, or click Choose a folder. A .zip of the folder works too. Convika reads it in your browser and shows "Uploads as a site" with the number of files. Under Site URL, Convika offers a free name such as my-app.convika.page; type another to check it. Click Create my preview.

4. Check the private preview

Convika uploads the files and opens a private preview of the app. Move to a route, reload the page there, and open a lazy-loaded screen, on your computer and your phone.

5. Publish it

Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends. To publish on Free, click Publish free. The app is live at my-app.convika.page.

Router paths open on reload

The Angular Router writes real paths, such as /settings/profile, with PathLocationStrategy, its default. A reload asks the server for that path, and a static host needs a rule that sends it to index.html. Convika has that rule built in: a path with no file extension that the app has no file for gets index.html, and the Router shows the route. Keep the router as it is; useHash: true isn't needed.

A missing file, such as /assets/missing.png, gets a 404.

Base href stays /

The app opens at the root of its own address, so <base href="/"> in src/index.html is right, and --base-href isn't needed. The chunks Angular loads for lazy routes, chunk-*.js, load from the root of the site.

Update the app at the same address

Run ng build again. In Convika, open the app's page screen. Under Update from an HTML file, click Upload a new version and drop the new browser folder, or its .zip. Click Upload as a new version, open the preview, then click Publish v2 at the same link and confirm with Publish. The address stays the same, and each earlier version keeps its own files, so you can go back to one.

What Free includes, and what Pro adds

FreePro
PriceNo credit card7 days free, then $12 a month
Apps live at once5100
Page views a month10,000100,000
An app's files together100 MB5 GB
Each HTML page4 MB4 MB
Who can open itPublicPublic, Private link, or Only people with the password
Convika barYesNo

A password or a private link covers every path of the app, for an internal tool or a client demo. Every app counts its visitors in your dashboard: where they came from and what they clicked.

Frequently asked questions

How do I deploy an Angular app for free?

Run ng build, then sign up free on Convika and drop the browser folder from dist/<project-name> on the upload screen. Click Create my preview, and publish with Publish page, Public, Next, and Publish free. The Free plan needs no credit card.

Which folder do I upload?

dist/<project-name>/browser, the folder with index.html in it. The folder above it holds 3rdpartylicenses.txt and, for a server-rendered app, a server folder that a static site doesn't use.

Does refreshing a route show a 404?

No. A reload of /settings asks for a file of that name, and Convika answers any such path with index.html, so the Router opens the route.

Do I need to change base href?

No. <base href="/"> is right, since the app opens at the root of <name>.convika.page.

Do lazy-loaded routes work?

Yes. Each lazy route's chunk is its own file in browser, and Convika serves it from its own path.

Do I need Git or GitHub?

No. Drop the folder or a .zip straight from your computer. Nothing to push.

Next step

How to password protect an HTML page or website

A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.

Related articles

More ways to send your page

Skipbox

Cheap & fast GitHub Actions runners, unlimited for $39 a month

Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.

Start a free Skipbox trial⁠

Share this article

Your Angular app, live at its own address

Drop dist/browser. Convika serves every route on reload, counts visitors, and keeps the address when you upload a new build.

Deploy my Angular app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.