https://github.com/railwayapp-templates/angular-starter
One-click default Angular TS starter, utilizing Caddy to serve!
https://github.com/railwayapp-templates/angular-starter
Last synced: about 1 year ago
JSON representation
One-click default Angular TS starter, utilizing Caddy to serve!
- Host: GitHub
- URL: https://github.com/railwayapp-templates/angular-starter
- Owner: railwayapp-templates
- Created: 2023-08-31T18:17:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T14:34:19.000Z (over 1 year ago)
- Last Synced: 2025-03-15T03:37:54.573Z (about 1 year ago)
- Language: HTML
- Size: 565 KB
- Stars: 1
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-awesome-angular - @railwayapp-templates/angular-starter - One-click default Angular TS starter, utilizing Caddy to serve! (Angular / Deployment)
- awesome-angular - @railwayapp-templates/angular-starter - One-click default Angular TS starter, utilizing Caddy to serve! (Angular / Deployment)
README
---
title: Angular + TypeScript + Caddy
description: The default Angular TS starter, utilizing `Caddy` to serve the built single page app
tags:
- Node
- Angular 19
- TypeScript
- Caddy
---
# Angular + TypeScript + Caddy
This project was originally generated with [`ng new my-app`](https://angular.dev/tools/cli/setup-local#create-a-workspace-and-initial-application)
[](https://railway.app/template/13NBfA?referralCode=brody)
## ✨ Features
- Angular 19 + TypeScript + Caddy
- Caddy v2
## 💁♀️ Local Development
- Install required dependencies with `npm install`
- Run `npm run dev` for a dev server
- Navigate to `http://127.0.0.1:4200/`. The application will automatically reload if you change any of the source files.
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
## ❓ Why use `Caddy` when deploying to Railway?
Caddy is a powerful, enterprise-ready, open source web server, and therefore Caddy is far better suited to serve websites than `ng serve` is, using Caddy will result in much less memory and cpu usage compared to serving with `ng serve` (much lower running costs too)
To see how this is achieved with nixpacks, check out the fully documented nixpacks.toml file in this repository
The configuration for Caddy is called a Caddyfile, and you can edit that file to further suite your needs, by default it comes configured to serve a single page app for Angular, and to also gzip the responses
**Relevant Caddy documentation:**
- [The Caddyfile](https://caddyserver.com/docs/caddyfile)
- [Caddyfile Directives](https://caddyserver.com/docs/caddyfile/directives)
- [root](https://caddyserver.com/docs/caddyfile/directives/root)
- [encode](https://caddyserver.com/docs/caddyfile/directives/encode)
- [file_server](https://caddyserver.com/docs/caddyfile/directives/file_server)
- [try_files](https://caddyserver.com/docs/caddyfile/directives/try_files)