crystallix
Version, currently 0.1.24 versions
- 0.1.2latestAug 10, 2020
- 0.1.2.1not indexedAug 10, 2020
- 0.1.1not indexedAug 10, 2020
- 0.1.0not indexedAug 10, 2020
github.com/De-Os/crystallix
No description declared in shard.yml.
Installation
# Add this to your shard.yml
dependencies:
crystallix:
github: De-Os/crystallix
version: ~> 0.1.2Then run:
shards installshard.yml
- Crystal
0.35.1- Author
- Alexander Vinogradov ~> vk.com/vinogradov.sasha || t.me/sasha_vinogradov
- Target
crystallixfrom src/crystallix.cr
Dependencies
This version declares no dependencies.
README
crystallix
A little web-server on Crystal which supports static files and CGI languages (tested with PHP)
Also, it gives you abilty to build pages using Crystal executables (See crweb section)
Installation
- Download release package (https://github.com/De-Os/crystallix/releases) and extract into empty folder
cc crystallix.o -o crystallix -rdynamic -L/usr/bin/../lib/crystal/lib -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl
- Or build it yourself:
git clone https://github.com/De-Os/crystallixcd crystallixcrystal build --release --progress src/crystallix.cr
Usage
Just run
./crystallix
If you use release package and have any issues like missing shared libraries execute in Crystallix folder:
cc crystallix.o -o crystallix -rdynamic -L/usr/bin/../lib/crystal/lib -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl
Configs
Crystallix searches configuration files only in cfg folder
Currently there are 2 configs: config.json and sites.json
config.json (main config)
port- main port (default -80)address- address which Crystallix will use (default -0.0.0.0)addons- CGI extensions path (default -{"crweb": true, "php": "/usr/bin/php-cgi"}), use it like"extension, without dot": "executable path (if crweb, just use true)"
SSL configuration (https)
THAT SECTION MAY NOT WORK, didn't test it
There is ssl section in config to configurate SSL:
use?- enable/disable SSL (default -false),port- SSL port (default -443)chain- path to chain file (default -cfg/ssl/chain.crt)key- path to key file (default -cfg/ssl/private.crt)
sites.json
Configuration for all sites stored in @:
path- path to the site folder (default -pages/tests/), requiredindex- array with indexes to try if file directory specified in url (default -["index.php", "index.html"]), requirederrors- list with custom pages for status code (default -{"404": "%site_path%/errors/404.html"},%site_path%tells Crystallix to use site path), optional:
"errors": {
"redirect": true,
"404": "%site_path%/errors/404.html",
"403": "%site_path%/errors/403.html",
"500": "%site_path%/errors/500.html"
}
If "redirect": true, Crystallix will redirect user to the path, otherwise it will just display file contents. Use redirect if you need include styles/scripts/etc.
For subdomains (tested)/many domains (not tested) specify individual list:
"@": {...},
"sub.domain.com": {
"path": "pages/sub",
"index": ["index.html"]
},
"...": {...}
crweb
From v0.1.1 you can use .crweb files, which should work like any CGI application
To create them easily, see https://github.com/De-Os/crystallix-pages
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.2- Tagged
- Aug 10, 2020
- Commit
8ec404275b1a- Crystal
0.35.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/De-Os/crystallix
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 4