-
Notifications
You must be signed in to change notification settings - Fork 8
Serving a Downloaded Project
David Foster edited this page Aug 5, 2025
·
3 revisions
Crystal can be run as a headless server that where you can use a web browser to view the contents of a downloaded project:
$ crystal --serve --headless MyDownloadedWebsite.crystalproj
Server started at: http://127.0.0.1:2797
Press Ctrl-C to stop.By default served projects can only be accessed on the same computer where Crystal is running. If you want to make a served project available to any other computer on the same network, use --host 0.0.0.0:
$ crystal --serve --headless --host 0.0.0.0 MyDownloadedWebsite.crystalproj
Server started at: http://0.0.0.0:2797
Press Ctrl-C to stop.You can also customize the --port that Crystal is served on:
$ crystal --serve --headless --host 0.0.0.0 --port 8080 MyDownloadedWebsite.crystalproj
Server started at: http://0.0.0.0:8080
Press Ctrl-C to stop.