New Project
- Install Crystal Lang
- Clone the project template (and optionally mirror it)
git clone https://github.com/spider-gazelle/spider-gazelle.gitcd spider-gazellegit push --mirror https://github.com/exampleuser/new-project.gitcd .. && git clone https://github.com/exampleuser/new-project.git
Configuring your project#
Common configuration options, such as your projects name and cookie key names, can be found in ./src/config.cr
Running your project#
crystal ./src/app.cr
to have the project live reload as you develop
then run the following command to have your project live reload
nodemon --exec crystal ./src/app.cr
Testing your project#
Spider-Gazelle leverages crystal langs built in testing libraries
- to run tests:
crystal spec - or as you edit code:
nodemon --exec crystal spec
Compiling your project#
crystal build ./src/app.cr
or
shards build --production- grabs the latest dependencies before the build
- deploys the binary as per the compile target in your
shard.yml
once compiled there are a number of command line options
- execute
./app --helpto see the options - viewing routes
./app --routes - run on a different port or host
./app -b 0.0.0.0 -p 80