• Stars
    star
    11
  • Rank 1,640,910 (Top 34 %)
  • Language
    Crystal
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use Sentry shard for reload your app

sentry-run

Build Status

A shard using Sentry for reload code changes with Sentry.run.

Installation

Add this to your application's shard.yml:

development_dependencies:
  sentry-run:
    github: faustinoaq/sentry-run

Then run shards update.

Usage

  1. Create a new process with process = Sentry.config(...)
  2. Execute Sentry.run(process) do ... end
require "kemal"
require "sentry-run"

get "/" do
  "Hello world"
end

process = Sentry.config(
  process_name: "App",
  build_command: "crystal",
  run_command: "./bin/app",
  build_args: ["build", "src/app.cr", "-o", "bin/app"],
  run_args: ["-p", "9000"])

Sentry.run(process) do
  Kemal.run
end

You can use Sentry.run for recompile and reload your code without external sentry.cr.

Default values:

process_name : String
build_command : String
run_command : String
build_args = [] of String
run_args = [] of String
files = ["src/**/*.cr", "src/**/*.ecr"]
should_build = true

How does it work?

Basically this shard checks a sentry.lock file.

When you run your code Sentry.run create a sentry.lock and then yield a block. After a code change Sentry recompiles your file and rerun a new app instance with run_command in Sentry.config.

Contributing

  1. Fork it ( https://github.com/faustinoaq/sentry-run/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Disclaimer

Sentry.run is intended for use in a development environment.

Contributors

  • faustinoaq Faustino Aguilar - creator, maintainer

More Repositories

1

crystal-windows-installer

Installer for Crystal on Bash on Windows
Inno Setup
37
star
2

ruby2crystal

A proof of concept tool to help porting gems to shards
Crystal
28
star
3

sswws

Super Simple Windows Web Server
Crystal
25
star
4

watcher

Crystal shard to watch file changes using File.stat
Crystal
20
star
5

kemal-watcher

Kemal plugin to watch files and live-reload the browser
Crystal
19
star
6

vscode-lex-flex-yacc-bison

Syntax highlighting for Lex, Flex, Yacc and Bison in VSCode.
18
star
7

secrets

Useful to get input on noecho, secrets, passwords, token, hints
Crystal
12
star
8

vscode-javac-linter

A Java linter for Visual Studio Code
TypeScript
10
star
9

interactive-crystal

Experiment with dynamic library loading
Crystal
8
star
10

vscode-mint-lang

VSCode extension for Mint Programming Language
6
star
11

ambrockets

Simple Websockets example using Amber
JavaScript
6
star
12

crystal-broadlink

Crystal shard for Broadlink IR controllers like remote controls, sensor platforms and smart plugs 📡
Crystal
4
star
13

pet-tracker

Amber Framework demo for Quick Start guide
Crystal
4
star
14

round-robin

Algoritmo de planificación por turnos (Round Robin)
Java
3
star
15

coscan

A project for scaning target sub-networks
Crystal
2
star
16

vector-matrix

Simulate matrix using vectors
Crystal
1
star
17

kemal-reuse-port

A kemal app using reuse port
Crystal
1
star
18

repo-intro-react-hls

JavaScript
1
star
19

amber-aur

AUR repository for Amber
Shell
1
star
20

vue-amber-recipe

An Amber Framework recipe using Vue.js
Crystal
1
star
21

huffman

An implementation of Huffman algorithm in Crystal for learning purposes
Crystal
1
star
22

macOS.qcow2

macOS VM in KVM with RX550 GPU passthrough
1
star
23

arreglos-c

Prácticas de arreglos en C
C
1
star