<commit_before># Modulware
## … helps you to organize plugins via folders in your webapplication

Here module(s) **are not** `node_modules` :) Modules are folders including code, config and routes for your webapplication, to keep it modular and a bit more organized.

## Example

A submodule could be:

```
+ project/
┃
┠─ server.js
┠─ package.json
┃
┖─ + mysubmodulemodule/
   ┃
   ┠─ routes.yml
   ┠─ config.yml
   ┃
   ┖─ + code/
      ┃
      ┠─ frontpage.js
      ┖─ + models/
         ┖─ contact.js
```

Example for `routes.yml`:

```yaml
routes:
  '/': frontpage.index
  'GET:/contact/:id([0-9]+)': contact.get
  'POST:/contact/:id([0-9]+)': contact.post
```

## Development status

Early alpha, not ready for production. Tested against the latest `expressjs` framework.

## Tests

Maybe later…

## License

MIT

<commit_msg>added example how to use it with expressjs<commit_after># Modulware
## … helps you to organize plugins via folders in your webapplication

Here module(s) **are not** `node_modules` :) Modules are folders including code, config and routes for your webapplication, to keep it modular and a bit more organized.

## Example

A submodule could be:

```
+ project/
┃
┠─ server.js
┠─ package.json
┃
┖─ + mysubmodulemodule/
   ┃
   ┠─ routes.yml
   ┠─ config.yml
   ┃
   ┖─ + code/
      ┃
      ┠─ frontpage.js
      ┖─ + models/
         ┖─ contact.js
```

Example for `routes.yml`:

```yaml
routes:
  '/': frontpage.index
  'GET:/contact/:id([0-9]+)': contact.get
  'POST:/contact/:id([0-9]+)': contact.post
```

You can use `js` or `coffeescript` files, depending on your compiler; they are included by the js `required` method.

Since it's a middleware, you have to combine it with frameworks. For now it work exclusively with `expressjs`:

```coffeescript
express = require('express')
app = express()

modulware = require('modulware')()
# or with options if you want to override the default settings (see: https://github.com/pstaender/modulware/blob/master/modulware.coffee#L7)
# options = { defaultHTTPMethod: 'GET'}
modulware.applyByMethods(app)

server = app.listen 3000, ->
  console.log('server is running')
```

## Development status

Early alpha, not ready for production. Tested against the latest `expressjs` framework. Not on npm, yet.

## Tests

Maybe later…

## License

MIT


{'fraction_non_alphanumeric': 0.13675582398619499, 'fraction_numerical': 0.0056082830025884385, 'mean_word_length': 3.6195219123505975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6041724', 'n_tokens_mistral': 816, 'n_tokens_neox': 775, 'n_words': 270}