example
This awesome project is powered by Amber Framework.
Getting Started
These instructions will get you a copy of this project up and running on your local machine for development and testing purposes.
See Production for notes on how to deploy the project on a live system.
Prerequisites
Before using this project you need to install crystal
and amber
.
See Crystal installation guide
Usage
Development
To setup your development settings edit config/environments/development.yml
file.
To run amber server in a development enviroment:
shards install
amber db create migrate
amber watch
Production
To setup your production settings use amber encrypt
. See encrypt command guide
To build and run a production release:
- Add an environment variable
AMBER_ENV
with a value ofproduction
export AMBER_ENV=production
- Run these commands:
shards install --production
shards build --release
amber db create migrate
bin/example
Tests
To run tests using Garnet Spec suite:
- Add an environment variable
AMBER_ENV
with a value oftest
export AMBER_ENV=test
- Run this command:
crystal spec
Docker Compose
Note: The Docker images are compatible with Heroku.
To set up the database and launch the server:
docker-compose up -d
To view the logs:
docker-compose logs -f
Contributing
- Fork it ( https://github.com/faustinoaq/example/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- faustinoaq Faustino Aguilar - creator, maintainer