# cyrus

> An express-based Node.js architype web application bootstrapping module.

Latest version **0.0.242** (published 2014-07-23) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cyrus
pnpm add cyrus
yarn add cyrus
bun add cyrus
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.242 |
| Published | 2014-07-23 |
| First published | 2014-03-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.24 |
| Dependencies | 13 |
| Known vulnerabilities | 0 (+14 in 6 direct dependencies) |
| Install scripts | no |
| Author | Russell Brown |
| Maintainers | 902labs |
| Keywords | cyrus js, node.js, node, express, javascript, js, web, mvc, framework |

## Links

- npm: https://www.npmjs.com/package/cyrus
- Repository: https://github.com/902Labs/cyrus-js
- Issues: https://github.com/902Labs/cyrus-js/issues
- npm.io page: https://npm.io/package/cyrus

## Dependencies (13)

- [async](https://npm.io/package/async.md) 0.2.10
- [debug](https://npm.io/package/debug.md) ~0.7.4
- [merge](https://npm.io/package/merge.md) *
- [moment](https://npm.io/package/moment.md) 2.5.1
- [morgan](https://npm.io/package/morgan.md) ~1.0.0
- [express](https://npm.io/package/express.md) ~4.0.0
- [body-parser](https://npm.io/package/body-parser.md) ~1.0.0
- [errorhandler](https://npm.io/package/errorhandler.md) ~1.0.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ~1.0.1
- [static-favicon](https://npm.io/package/static-favicon.md) ~1.0.0
- [connect-timeout](https://npm.io/package/connect-timeout.md) ~1.0.0
- [express-session](https://npm.io/package/express-session.md) 1.0.2
- [method-override](https://npm.io/package/method-override.md) ~1.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.242 (latest) — 2014-07-23
- 0.0.241 — 2014-07-10
- 0.0.235 — 2014-05-14
- 0.0.234 — 2014-05-12
- 0.0.233 — 2014-05-12
- 0.0.231 — 2014-04-13
- 0.0.230 — 2014-04-12
- 0.0.229 — 2014-03-28
- 0.0.228 — 2014-03-14

## README

# Cyrus

[![NPM](https://nodei.co/npm/cyrus.png)](https://npmjs.org/package/cyrus)

CyrusJS is an implementation or wrapper for the ExpressJS framework. Cyrus was created with the intention to assist in the rapid deployment of standardized web applications and provide a small level of convention over configuration such as auto-loading controllers. Cyrus is configuration file driven and is easy to setup environments for multiple developers and servers. The Cyrus Generator The goal was to assist developers and teams in creating consistent code bases for multiple modules or applications accross time, thereby creating a more devloper friendly environment and making future development, patching and training easier and more cost effective.

### Disclaimer
Cyrus is being used in multiple applications in production, but I would recommend making sure you tie your project to a specific release. If you are interested in making any sugesttions please fork and submit a pull request and I will merge as quickly as possible.

### Getting Started

Cyrus can very easily be used on it's own, however using the yeoman generator will fully and correctly stub out a working example site. The generated code is very lightweight and will give you a running site in about 1 minute.

[Visit The Cyrus Generator For Full Documentation](https://github.com/902Labs/generator-cyrus)

### Config File Properties

|  Property  |  Opt?  |  Default  |  Description  |
|  ------------  |  --------  |  -----------  |  -----------  |
|  ssl  |  yes  |  False  |  Run the app in https mode?  |
|  app_mode  |  |  None  |  -2 (test),  -1 (dev), 0 (stage), 1 (production)  |
|  server_port  |  |  None  |  Port to run webserver on  |
|  public_folder  |  yes  |  public  |  Absolute path to public folder  |
|  controllers_folder  |  yes  |  app/controller  |  Absolute path to controllers folder (recursive)  |
|  model_root  |  yes  |  app/model  |  Absolute path to models folder  |
|  views_folder  |  yes  |  app/view  |  Absolute path to views folder  |
|  view_engine  |  yes  |  jade  |  View engine, Express property  |
|  enable_js_middleware  |  yes  |  False  |  Enable the JS middleware inline pre-compiler  |
|  js_folder  |  yes  |  app/resources/js  |  Absolute path to raw javascript folder  |
|  enable_less_middleware  |  yes  |  False  |  Enable the JS middleware inline pre-compiler  |
|  less_folder  |  yes  |  app/resources/less  |  Absolute path to raw LESS folder  |
|  cookie_secret  |  |  |  Express Middleware Cookie Secret  |
|  session_secret  |  |  |  Express Middleware Session Secret  |
|  mongoose  |  yes  |  {}  |  Mongoose connection properties. See example  |
|  redis  |  yes  |  {}  |  Redis connection properties. See example  |
|  mysql  |  yes  |  {}  |  MySql connection properties. See example  |
|  mailserver  |  yes  |  {}  |  Mail Server properties. See example  |


### Config File Example
```
var path = require('path')

exports.load = function(appRoot) {
    var config = {};

    config["ssl"] = false;
    config["app_mode"] = -1; // -2=test, -1=dev, 0=stage, 1=production

    config["server_port"] = 8000;

    config["public_folder"] = path.resolve("./client/public");
    config["controllers_folder"] = path.resolve("./server/controller");
    config["model_root"] = path.resolve("./lib/model");

    config["view_engine"] = "jade";
    config["views_folder"] = path.resolve("./client/view");

    config["enable_js_middleware"] = true;
    config["js_folder"] = path.resolve("./client/resources/js");

    config["enable_less_middleware"] = true;
    config["less_folder"] = path.resolve("./client/resources/styles");

    config["cookie_secret"] = "Xv2Irkb7SfsPhz-AQ-33xGdIqFslrf5uE9N";
    config["session_secret"] = "1440qWCyzQr_82w275wPX1LPodLSZK0EhyR";

    config["mongoose"] = {
          "connection": "mongodb://localhost/myapp_io"
        , "store_sessions": false
    };

    config["mysql"] = {
        "host": '127.0.0.1',
        "user": 'jonny5',
        "password": '3@8721^$324#',
        "database": 'myapp_io',
        "connectionLimit": 10 // ConnectionLimit will force the use of the MySQL pool
    };

    config["redis"] = {
            "host": "127.0.0.1"
          , "port": 6379
    };

    config["mailserver"] = {
          "host": "mailtrap.io"
        , "port": 465
        , "secureConnection": false
        , "auth": {
              "user": "192328c6d3465317b"
            , "pass": "1e0e737a891852"
        }
    };

    // You can also write functions inside your configuration
    config["getModel"] = function(model) {
        return require(path.join(path.resolve("./lib/model"), model + ".js"));
    }


    return config;
}

---
_Source: https://npm.io/package/cyrus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
