# webjs-cli

> webjs cli

Latest version **0.1.6** (published 2015-08-17) ·   license · 0 weekly downloads

## Install

```sh
npm install webjs-cli
pnpm add webjs-cli
yarn add webjs-cli
bun add webjs-cli
```

Provides the command `webjs`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2015-08-17 |
| First published | 2015-08-16 |
| Weekly downloads | 0 |
| License |   |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | George |
| Maintainers | g3org3 |

## Links

- npm: https://www.npmjs.com/package/webjs-cli
- Repository: https://github.com/g3org3/webjs-cli
- Issues: https://github.com/g3org3/webjs-cli/issues
- npm.io page: https://npm.io/package/webjs-cli

## Dependencies (4)

- [q](https://npm.io/package/q.md) ^1.4.1
- [chalk](https://npm.io/package/chalk.md) ^1.1.0
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [commander](https://npm.io/package/commander.md) ^2.8.1

## Recent versions

- 0.1.6 (latest) — 2015-08-17
- 0.1.5 — 2015-08-17
- 0.1.4 — 2015-08-16
- 0.1.3 — 2015-08-16
- 0.1.2 — 2015-08-16
- 0.1.1 — 2015-08-16
- 0.1.0 — 2015-08-16

## README

# webjs [![npm version](https://badge.fury.io/js/webjs-cli.svg)](http://badge.fury.io/js/webjs-cli)

### Installation
```sh
$ [sudo] npm install -g webjs-cli
```

### Create a new app
```sh
$ webjs new my_app
```

### Features &nbsp;
Call any service from any controller!
```javascript
// No need to require your service! :O
var fn = require('../services/myService.js'); // [ X ]
fn.findInArray(users, "id", 1);

// Simply use them in your controllers by the service name B|
myService.findInArray(users, "id", 1); // [ √ ]

```

### Routes &nbsp;
```javascript
/*
 * Routes Config
 */
module.exports {
  // Examples
  '/': 'SampleController.getInfo',
  'POST /user': 'UserController.create',
  // you may also render a view like this
  '/home': 'home'
}
```

### Controllers &nbsp;
```javascript
/*
 * SampleController
 */
module.exports {
  //action
  getInfo: function(req, res){
    SampleService.findInArray(req.param.users, "id", "72A4FC83EF812BA1");
    res.send("ready");
  },
  main: function(req, res){
    res.render("home");
  }
}
```
### Services &nbsp;
```javascript
/*
 * SampleService
 */
module.exports {
  //action
  findInArray: function(array, key, value){
    ...
  }
}
```

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