crystalworld alternatives and similar shards
Based on the "Examples and funny stuff" category.
Alternatively, view crystalworld alternatives based on common mentions on social networks and blogs.
-
kemal-chat
Sample application to demonstrate how easy it is to build realtime applications with Kemal using WebSocket. -
kemal-ws-react-pg-todo-app
Realtime Todo application developed with Kemal, React, ES2015 and PostgreSQL -
kemal-heroku-example
Kemal is super simple web framework powered Crystal lang. These repo show's how to use with heroku. -
kemal-ws-pg-todo-app
Realtime Todo application developed with Kemal, Websockets, ES2015 and PostgreSQL
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of crystalworld or a related project?
README
[Crystal World logo](media/logo.png)
Welcome to the Crystal World, a RealWorld back-end API application implemented in Crystal!
About
This project aims to demonstrate of how simple and enjoyable it is to develop a high-performance web application in Crystal, which is proven to be both fast and slick language, featuring:
- โก๏ธ Efficiency comparable to C
- ๐ Beauty inherited from Ruby
- ๐ Type system with smart compiler
Crystal World relies on Onyx framework as its foundation. The database chosen is SQLite. Go ahead and read the source code, you'll find it delightfully simple and understandeable! ๐ฐ
Note that although Crystal itself is not officially released yet, it's already being used in many real-world (including business) applications.
Installation
Clone this repository with
> git clone https://github.com/vladfaust/crystalworld.git && cd crystalworld
Crystal is a compiled language. It has different compilation modes, e.g. development and production. Production code is faster and packed into a single binary, however its builds take more time. Therefore, there are multiple ways to proceed:
Production build with Docker
- Build an image:
> docker build -t crystalworld:latest .
- Apply migrations:
> docker run -e DATABASE_URL="sqlite3://./crystalworld.db" crystalworld bin/cake db:migrate
- Launch the server
> docker run -p 5000:5000 -e DATABASE_URL="sqlite3://./crystalworld.db" \
-e JWT_SECRET_KEY="63a051d73d71c997d38946f82e708301" crystalworld
Production build from the source code
- Install Crystal on your machine
- Set env vars
> export DATABASE_URL="sqlite3://./crystalworld.db" CRYSTAL_ENV=production \
JWT_SECRET_KEY="63a051d73d71c997d38946f82e708301"
- Build the app
> time shards build --production --release --no-debug --progress --stats
- Apply migrations
> ./bin/cake db:migrate
- Launch the server
> ./bin/server
Development build from the source code
- Install Crystal on your machine
- Create an
/.env.development.local
file and put some environment variables there (see below) - Apply migrations
> crystal src/bin/cake.cr -- db:migrate
or install Cake and exec cake db:migrate
- Launch the server in development mode
> crystal src/bin/server.cr --progress
Example output:
[Example terminal screenshot](media/terminal-screenshot.png)
Environment variables
Crystal World follows twelve-factor methodology and therefore relies on environment variables. You can see example and default variables at /.env.example
file.
Testing
Crystal has a convenient testing environment built-in. Read more at Testing docs. Basically, you place specs under /spec
folder and run them with crystal spec
. It's also a good idea to have a separate /.env.test
file.
Real World comes with integration testing suit, which can be found at https://github.com/gothinkster/realworld/tree/master/api. Crystal World uses this script in its CI, so if the badge is green it means that all the integration tests are passed. You can run these tests locally on your machine as well, just to be sure.
Contributors
- @vladfaust Vlad Faust - creator, maintainer
Licensing
This software is licensed under [MIT License](LICENSE).
*Note that all licence references and agreements mentioned in the crystalworld README section above
are relevant to that project's source code only.