https://github.com/phel-lang/web-skeleton
A simple skeleton to build a website using Phel.
https://github.com/phel-lang/web-skeleton
functional-programming phel phel-lang php scaffolding webapp
Last synced: about 1 month ago
JSON representation
A simple skeleton to build a website using Phel.
- Host: GitHub
- URL: https://github.com/phel-lang/web-skeleton
- Owner: phel-lang
- License: other
- Created: 2023-01-22T11:18:20.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-09T17:29:01.000Z (5 months ago)
- Last Synced: 2025-09-27T05:50:24.907Z (about 2 months ago)
- Topics: functional-programming, phel, phel-lang, php, scaffolding, webapp
- Language: PHP
- Homepage: https://phel-lang.org/
- Size: 41 KB
- Stars: 15
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phel Web Skeleton
[Phel](https://phel-lang.org/) is a functional programming language that compiles to PHP.
This repository provides you the basic setup to start coding a website using phel.
## Getting started
### Requirements
Phel requires at least PHP 8.3.
#### Locally (no Docker)
1. Ensure you have PHP >=8.3 (Some help about how to install multiple PHP versions locally on [linux](https://github.com/phpbrew/phpbrew) and [Mac](https://github.com/shivammathur/homebrew-php))
1. Ensure you have [composer](https://getcomposer.org/composer-stable.phar)
1. Clone this repo
1. Install the dependencies | `composer install`
#### Using Docker
1. Clone this repo
1. Build the image | `docker-compose up -d --build`
1. Go inside the console | `docker exec -ti -u dev phel_web_skeleton bash`
1. Install the dependencies | `composer install`
### Phel code
1. Write your phel code in `src/`
2. Run your web server with
- `composer run:dev`: it will recompile the code on every request
- `composer run:prod`: it will run the same compiled code on every request
### Tests
1. Write your phel tests in `tests/`
1. Execute your tests with `composer test`
## More about starting with phel
Find more information about how to start with phel in [getting started](https://phel-lang.org/documentation/getting-started/).