Skip to content

New Project

  1. Install Crystal Lang
  2. Clone the project template (and optionally mirror it)
  3. git clone https://github.com/spider-gazelle/spider-gazelle.git
  4. cd spider-gazelle
  5. git push --mirror https://github.com/exampleuser/new-project.git
  6. cd .. && 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

  1. Install NodeJS
  2. Install nodemon npm i -g nodemon

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 --help to see the options
  • viewing routes ./app --routes
  • run on a different port or host ./app -b 0.0.0.0 -p 80