Skip to content

Deploy an Angular app to Appwrite Sites

1

Create Angular app

First, you must either create an Angular app or setup the Angular starter template.

Open your terminal, and run the following command.

Bash
npm install -g @angular/cli@17
ng new my-app

Push this project to a GitHub repo.

2

Create Appwrite project

Head to the Appwrite Console.

Create Appwrite project

If this is your first time using Appwrite, create an account and create your first project.

3

Create site

Head to the Sites page in your Appwrite project, click on the Create site button, and select Connect a repository.

Connect your GitHub account and select the repository you intend to deploy.

  1. Select the production branch and root directory from your repo.

  2. Verify that the correct framework is selected. In case an incorrect framework is visible, pick Angular from the drop-down list.

  3. Confirm the install command, build command, and output directory in the build settings. The default build settings for Angular are:

    • Install command: npm install

    • Build command: npm run build

    • Output directory: ./dist/angular/browser

  4. Add any environment variables required by the site.

Click on the Deploy button.

4

Visit site

After successful deployment, click on the Visit site button.