sugar

Version, currently master branch1 version
  • master branchlatestJun 21, 2021

github.com/jaeming/crystal_crud_app

No description declared in shard.yml.

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  sugar:
    github: jaeming/crystal_crud_app
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.0.0
License
MIT
Author
Benji
Target
  • sugar from src/sugar.cr

Dependencies

Runtime Dependencies

  • pg*github: will/crystal-pg
  • granite*github: amberframework/granite
  • micrate*github: juanedi/micrate

README

sugar

db

make this binary executable chmod +x bin/micrate and adjust database url there (adjust the one in models/post too).

then:

bin/micrate create create_posts

bin/micrate up

do some crud stuff cli style:

crystal ./src/sugar.cr -t Index

crystal ./src/sugar.cr -t Index -p "{\"published\":true}"

crystal ./src/sugar.cr -t Create -p "{\"title\":\"Crystal is good\",\"body\":\"shards there are\",\"published\":true}"