Skip to content

Commit

Permalink
fix nav links ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
tongueroo committed Aug 12, 2018
1 parent ade889d commit 7a3eb87
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 48 deletions.
59 changes: 26 additions & 33 deletions docs/_docs/crud-json-activerecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,26 @@ $

Let's start the server.

```sh
$ jets server
=> bundle exec shotgun --port 8888 --host 127.0.0.1
Jets booting up in development mode!
== Shotgun/WEBrick on http://127.0.0.1:8888/
[2018-08-10 23:01:05] INFO WEBrick 1.4.2
[2018-08-10 23:01:05] INFO ruby 2.5.1 (2018-03-29) [x86_64-linux]
[2018-08-10 23:01:05] INFO WEBrick::HTTPServer#start: pid=13999 port=8888
```
$ jets server
=> bundle exec shotgun --port 8888 --host 127.0.0.1
Jets booting up in development mode!
== Shotgun/WEBrick on http://127.0.0.1:8888/
[2018-08-10 23:01:05] INFO WEBrick 1.4.2
[2018-08-10 23:01:05] INFO ruby 2.5.1 (2018-03-29) [x86_64-linux]
[2018-08-10 23:01:05] INFO WEBrick::HTTPServer#start: pid=13999 port=8888

## Test the API

Here's a curl command that will create posts:

```sh
curl -X POST http://localhost:8888/posts \
-H 'Content-Type: application/json' \
-d '{
"post": {
"title": "My Test Post 1"
}
}
'
```
curl -X POST http://localhost:8888/posts \
-H 'Content-Type: application/json' \
-d '{
"post": {
"title": "My Test Post 1"
}
}
'

Create a couple of posts and you see something like this when you open [http://localhost:8888/posts](http://localhost:8888/posts) in a browser:

Expand All @@ -152,22 +148,19 @@ Here are a few more curl commands for reference:

If you want to update the posts, here's the curl command:

```sh
curl -X PUT http://localhost:8888/posts/1 \
-H 'Content-Type: application/json' \
-d '{
"post": {
"title": "My Test Post 1"
}
}
'
```
curl -X PUT http://localhost:8888/posts/1 \
-H 'Content-Type: application/json' \
-d '{
"post": {
"title": "My Test Post 1"
}
}
'

To delete the, here's the curl command:
```
$ curl -X DELETE http://localhost:8888/posts/1
{"deleted":true}
```

$ curl -X DELETE http://localhost:8888/posts/1
{"deleted":true}

<a id="prev" class="btn btn-basic" href="{% link _docs/crud-html-activerecord.md %}">Back</a>
<a id="next" class="btn btn-primary" href="{% link _docs/how-jets-works.md %}">Next Step</a>
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/env-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ These files only get loaded for the configured valued of `JETS_ENV`. This allows

The last example file is `.env.development.deploy`. The values from this file only get loaded for the deployed remote Lambda Functions. It can be useful if you need different values on the lambda function and would like to keep the same `JETS_ENV`.

<a id="prev" class="btn btn-basic" href="{% link _docs/app-config.md %}">Back</a>
<a id="next" class="btn btn-primary" href="{% link _docs/env-files.md %}">Next Step</a>
<a id="prev" class="btn btn-basic" href="{% link _docs/function-properties.md %}">Back</a>
<a id="next" class="btn btn-primary" href="{% link _docs/config-rules.md %}">Next Step</a>
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
18 changes: 6 additions & 12 deletions docs/_docs/local-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ To speed up development, you can run a local server which mimics API Gateway. Te

jets server

You can test your app at http://localhost:8888. Here's a curl command to create a post:
You can test your app at [http://localhost:8888](http://localhost:8888). Here's a curl command to create a post:

$ curl -s -X POST http://localhost:8888/posts -d '{
"id": "myid",
"title": "test title",
"desc": "test desc"
}' | jq .
{
"action": "create",
curl -X POST http://localhost:8888/posts \
-H 'Content-Type: application/json' \
-d '{
"post": {
"id": "myid",
"title": "test title",
"title": "My Test Post 1",
"desc": "test desc",
"created_at": "2017-11-04T01:46:03Z",
"updated_at": "2017-11-04T01:46:03Z"
}
}
'

You can find examples of all the CRUD actions at [Jets CRUD Tutorials]({% link _docs/tutorials.md %}).

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/polymorphic-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ exports.handler = function(event, context, callback) {
};
```

<a id="prev" class="btn btn-basic" href="{% link _docs/polymorphic-node.md %}">Back</a>
<a id="prev" class="btn btn-basic" href="{% link _docs/polymorphic-python.md %}">Back</a>
<a id="next" class="btn btn-primary" href="{% link _docs/tutorials.md %}">Next Step</a>
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>

0 comments on commit 7a3eb87

Please sign in to comment.