Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/example-getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

This is the basic tutorial for getting started with Loopback 4!

To get started, jump into the
[Prerequisites and setup](docs/1-prerequisites-and-setup.md) section.

## Tutorial Steps

1. [Prerequisites and setup](docs/1-prerequisites-and-setup.md)
1. [Scaffolding your application](docs/2-scaffold-app.md)
1. [Adding the legacy juggler](docs/3-add-legacy-juggler.md)
1. [Add your Todo model](docs/4-todo-model.md)
1. [Add a datasource](docs/5-datasource.md)
1. [Add a repository](docs/6-repository.md)
1. [Add a controller](docs/7-controller.md)
1. [Putting it all together](docs/8-putting-it-together.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting to use 1. for all items :-). Personally I prefer to number them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly simplifies copy/paste/reordering in the future. Most parsers automatically iterate and number them for you this way.


### Stuck?
Check out our [Gitter channel](https://gitter.im/strongloop/loopback) and ask
for help with this tutorial!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ cd loopback-example-getting-started && npm i
```
npm start
```

### Navigation

Next step: [Scaffolding your application](2-scaffold-app.md)
6 changes: 6 additions & 0 deletions packages/example-getting-started/docs/2-scaffold-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ not to enable certain project features (loopback's build, tslint, mocha, etc.),
leave them all enabled.

<!-- TODO: Add screenshot of terminal here to illustrate what we mean. -->

### Navigation

Previous step: [Prerequisites and setup](1-prerequisites-and-setup.md)

Next step: [Adding the legacy juggler](3-add-legacy-juggler.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Adding Legacy Juggler Capabilities
### Adding the Legacy Juggler

Jump into the directory for your new application. You'll see a folder structure
similar to this:
Expand Down Expand Up @@ -52,3 +52,8 @@ export class TodoApplication extends RepositoryMixin(RestApplication) {
}
}
```
### Navigation

Previous step: [Scaffolding your application](2-scaffold-app.md)

Next step: [Add your Todo model](4-todo-model.md)
5 changes: 5 additions & 0 deletions packages/example-getting-started/docs/4-todo-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,8 @@ export const TodoSchema: SchemaObject = {
required: ['title'],
};
```
### Navigation

Previous step: [Adding the Legacy Juggler](3-add-legacy-juggler.md)

Next step: [Add a datasource](5-datasource.md)
6 changes: 6 additions & 0 deletions packages/example-getting-started/docs/5-datasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ export const db = new DataSourceConstructor(config);

This will give us a strongly-typed datasource export that we can work with to
construct our TodoRepository definition.

### Navigation

Previous step: [Add your Todo model](4-todo-model.md)

Next step: [Add a repository](6-repository.md)
5 changes: 5 additions & 0 deletions packages/example-getting-started/docs/6-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ export class TodoRepository extends DefaultCrudRepository<
}
}
```
### Navigation

Previous step: [Add a datasource](5-datasource.md)

Next step: [Add a controller](7-controller.md)
6 changes: 6 additions & 0 deletions packages/example-getting-started/docs/7-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ export class TodoController {
}
}
```

### Navigation

Previous step: [Add a repository](6-repository.md)

Final step: [Putting it all together](8-putting-it-together.md)
12 changes: 12 additions & 0 deletions packages/example-getting-started/docs/8-putting-it-together.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ Start the app (`npm start`) and then make some REST requests:
- `POST /todo` with a body of `{ "title": "get the milk" }`
- `GET /todo/1` and see if you get your Todo object back.
- `PATCH /todo/1` with a body of `{ "desc": "need milk for cereal" }`

### Navigation

Previous step: [Add a controller](7-controller.md)

### More examples and tutorials

Eager to continue learning about LoopBack 4? Check out our
[examples and tutorials](https://loopback.io/doc/en/lb4/Examples-and-tutorials.html)
section to find examples for creating your own custom components, sequences and
more!