Skip to content

Commit

Permalink
Use nodemon to restart server
Browse files Browse the repository at this point in the history
  • Loading branch information
shootingfly committed Aug 8, 2020
1 parent 2ebe0e5 commit 3f14451
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ end

### After Filter
```crystal
class BeforeExample < BaseAction
class AfterExample < BaseAction
after log_params
def log_params
Runcobo::Log.info { "#{params}" }
end
get "/before_example"
get "/after_example"
call do
render_plain "Hello World!"
end
Expand All @@ -44,7 +44,7 @@ end
class SkipExample < BaseAction
skip required_login
get "/before_example"
get "/skip_example"
call do
render_plain "Hello World!"
end
Expand Down
9 changes: 8 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ crystal src/demo.cr
5.Send request.
```shell
curl "http://0.0.0.0:3000/api/v1/add?a=1&b=2"
```
```

6.Auto restart server.
```shell
# Use nodemon to watch file changed and auto restart server.
sudo npm install -g nodemon
nodemon -e "cr,water,jbuilder,yml" --exec "crystal run" src/demo.cr
```

0 comments on commit 3f14451

Please sign in to comment.