Skip to content

Commit

Permalink
docs: add preliminary guide files (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharygolba authored Dec 6, 2016
1 parent 16d224b commit 590956e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
11 changes: 11 additions & 0 deletions guide/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
For a list of all commands available in the CLI run the following:

```bash
lux --help
```

For help with an individual command, you can use --help as well.

```bash
lux serve --help
```
22 changes: 22 additions & 0 deletions guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Installation

```bash
npm install -g lux-framework
```

### Creating Your First Project

Use the new command to create your first project.

```bash
lux new <app-name>
```

### Running

To run your application use the serve command.

```bash
cd <app-name>
lux serve
```
19 changes: 19 additions & 0 deletions guide/route-definitions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Routes are added in the function exported from ./app/routes.js.

This function takes two arguments route and resource which are also functions.

Declaring a route will add a single route to your application and requires you to provide the path as the first argument as well as the method and action in an options hash as the second argument. This function should only be used for defining custom routes.

Declaring a resource will add all CRUD routes for a controller to your application. The resource function only takes one argument and that is the name of the resource.

```javascript
export default function routes() {
this.resource('posts');
this.resource('users', function () {
// GET /users/custom-route => UsersController#customRoute
this.get('custom-route');
// GET /users/custom-route => UsersController#myCustomAction
this.get('custom-route', 'myCustomAction');
});
}
```

0 comments on commit 590956e

Please sign in to comment.