<commit_before># Geddy
####A simple, structured web framework for Node

```
$ npm install -g geddy
$ geddy app my_app
$ cd my_app
$ geddy
// app now running on localhost:4000
```


[![build status](https://secure.travis-ci.org/mde/geddy.png)](http://travis-ci.org/mde/geddy)

### Documentation

Docs are located on the GeddyJS website: http://geddyjs.org/documentation

### Goals

  * Easy to use
  * Modular
  * Fast

Geddy should make things easy for the most basic applications,
but still let you get under the hood and tinker if you want.

### Features

  * Powerful, flexible router
  * Easy resource-based routing
  * Database adapters for Postgres, MongoDB, Riak, and in-memory
  * App, resource and scaffold generators
  * Content-negotiation
  * Session support (in-memory, cookie)
  * Multiple template engine support (EJS, Jade, Mustache, Handlebars)
  * Real Time API generation (socket.io integration)
  * View helpers ([Docs](https://github.com/mde/geddy/wiki/View-Helpers))
  * Fully non-blocking

### License

Apache License, Version 2

### Prerequisites

Geddy requires version 0.6.x of Node.js or higher, and the
[Jake](https://github.com/mde/jake) JavaScript build-tool.

### Installing with [NPM](http://npmjs.org/)

```
[sudo] npm -g install geddy
```

Note: Geddy (specifically, the generators) is a system-level
tool, and wants to be installed globally.

### Installing from Github

To get Geddy from Github and install it do:

```
git clone <EMAIL>:mde/geddy.git
cd geddy
make && sudo make install
```

By default Geddy is installed in "/usr/local." To install it into a
different directory (e.g., one that doesn't require super-user
privilege), pass the PREFIX variable to the `make install` command.
For example, to install it into a "geddy" directory in your home
directory, you could use this:

```
make && make install PREFIX=~/geddy
```

If you do install Geddy somewhere special, you'll need to add the
"bin" directory in the install target to your PATH to get access
to the `geddy` executable.

### Creating a Geddy application

To create Geddy applications simply run `geddy app <name>`.
Then you can run `geddy` inside the application to start the server.

```
mde@localhost:~/work$ geddy app bytor
Created app bytor.
mde@localhost:~/work$ cd bytor
mde@localhost:~/work/bytor$ geddy
Server running at http://127.0.0.1:4000/
```

Go to http://localhost:4000/, and you should see the introduction page.

### Generating resources

Use `geddy resource <name> [model properties]` to generate a resource in your application.
A resources does not generate a view, but creates a view directory. A resource route will be
created for you.

````
mde@localhost:~/work$ geddy resource snow_dog breed:string name:string color:string
[Added] app/models/snow_dog.js
[Added] app/controllers/snow_dogs.js
[Added] Resource snow_dogs route added to config/router.js
[Added] snow_dogs view directory
```

Now start your Geddy server and your new route will work. Trying this for example
will return the params for the index action in JSON:

```
$ curl localhost:4000/snow_dogs.json
{"params":{"method":"GET","controller":"SnowDogs","action":"index","format":"json"}}
```

Geddy generators handle plural inflections for model and controller names (e.g., "person" to "people").
To read about the model properties argument jump to [Model properties](#model-properties)

### Generating scaffolding

Use `geddy scaffold <name> [model properties]` to generate scaffoling in your application.
Scaffolding creates full CRUD actions, includes views, and will default your configuration to use
[Mongodb](http://www.mongodb.org/). Resource routes will be created for you.

````
mde@localhost:~/work$ geddy scaffold snow_dog breed:string name:string color:string
[Added] app/models/snow_dog.js
[Added] app/controllers/snow_dogs.js
[Added] Resource snow_dogs route added to config/router.js
[Added] View templates<commit_msg>Add punctuation, copyedit for style<commit_after># Geddy
####A simple, structured web framework for Node

```
$ npm install -g geddy
$ geddy app my_app
$ cd my_app
$ geddy
// app now running on localhost:4000
```


[![build status](https://secure.travis-ci.org/mde/geddy.png)](http://travis-ci.org/mde/geddy)

### Documentation

Docs are located on the GeddyJS website: http://geddyjs.org/documentation

### Goals

  * Easy to use
  * Modular
  * Fast

Geddy should make things easy for the most basic applications,
but still let you get under the hood and tinker if you want.

### Features

  * Powerful, flexible router
  * Easy resource-based routing
  * Database adapters for Postgres, MongoDB, Riak, and in-memory
  * App, resource and scaffold generators
  * Content-negotiation
  * Session support (in-memory, cookie)
  * Multiple template engine support (EJS, Jade, Mustache, Handlebars)
  * Real Time API generation (socket.io integration)
  * View helpers ([Docs](https://github.com/mde/geddy/wiki/View-Helpers))
  * Fully non-blocking

### License

Apache License, Version 2

### Prerequisites

Geddy requires version 0.6.x of Node.js or higher, and the
[Jake](https://github.com/mde/jake) JavaScript build-tool.

### Installing with [NPM](http://npmjs.org/)

```
[sudo] npm -g install geddy
```

Note: Geddy (specifically, the generators) is a system-level
tool, and wants to be installed globally.

### Installing from Github

To get Geddy from Github and install it do:

```
git clone <EMAIL>:mde/geddy.git
cd geddy
make && sudo make install
```

By default Geddy is installed in "/usr/local." To install it into a
different directory (e.g., one that doesn't require super-user
privilege), pass the PREFIX variable to the `make install` command.
For example, to install it into a "geddy" directory in your home
directory, you could use this:

```
make && make install PREFIX=~/geddy
```

If you do install Geddy somewhere special, you'll need to add the
"bin" directory in the install target to your PATH to get access
to the `geddy` executable.

### Creating a Geddy application

To create Geddy applications simply run `geddy app <name>`.
Then you can run `geddy` inside the application to start the server.

```
mde@localhost:~/work$ geddy app bytor
Created app bytor.
mde@localhost:~/work$ cd bytor
mde@localhost:~/work/bytor$ geddy
Server running at http://127.0.0.1:4000/
```

Go to http://localhost:4000/, and you should see the introduction page.

### Generating resources

Use `geddy resource <name> [model properties]` to generate a resource in your application.
A resources does not generate a view, but creates a view directory. A resource route will be
created for you.

````
mde@localhost:~/work$ geddy resource snow_dog breed:string name:string color:string
[Added] app/models/snow_dog.js
[Added] app/controllers/snow_dogs.js
[Added] Resource snow_dogs route added to config/router.js
[Added] snow_dogs view directory
```

Now start your Geddy server and your new route will work. Trying this for example
will return the params for the index action in JSON:

```
$ curl localhost:4000/snow_dogs.json
{"params":{"method":"GET","controller":"SnowDogs","action":"index","format":"json"}}
```

Geddy generators handle plural inflections for model and controller names (e.g., "person" to "people").
To read about the model properties argument, see [Model properties](#model-properties).

### Generating scaffolding

Use `geddy scaffold <name> [model properties]` to generate scaffoling in your application.
Scaffolding creates full CRUD actions, includes views, and will default your configuration to use
[Mongodb](http://www.mongodb.org/). Resource routes will be created for you.

````
mde@localhost:~/work$ geddy scaffold snow_dog breed:string name:string color:string
[Added] app/models/snow_dog.js
[Added] app/controllers/snow_dogs.js
[Added] Resource snow_dogs route added to config/router.js
[Added] View templates
{'fraction_non_alphanumeric': 0.10813214739517153, 'fraction_numerical': 0.0063532401524777635, 'mean_word_length': 4.666666666666667, 'pattern_counts': {'":': 10, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2906732', 'n_tokens_mistral': 2524, 'n_tokens_neox': 2373, 'n_words': 938}