1.0.8 • Published 7 months ago

crabjs v1.0.8

Weekly downloads
-
License
-
Repository
github
Last release
7 months ago

CrabJS

easy work is comming... (under development)

NPM version

CrabJS is a powerfull API Framework that works with a lot of outstanding modules and is fully configured by annotations.

To install, run:

npm install -g crabjs

If you want to see available options con cjs, you can see the help.

cjs -h or cjs --help

To create / initiate a project, just type inside the directory:

cjs init

How does it works?

With CrabJS cli, you can easily create API controllers and entities for your backend. When you initiate a project, you will receive your first credentials to your API. CrabJS uses Express to route paths and it is so easy to create an example controller. To do this, just type:

cjs create mycontroller

As we use annotations to perform api settings, you need to specify the paths you want to map. After you create an controller, you will see this content on controller file:

/**
* @Controller
* @route('/mycontroller')
*/
  function mycontroller() {
  /**
    * @route('/')
    * @method('GET')
    */
    this.get = function (req, res) {
       res.send("alive");
    } 
  }

module.exports = mycontroller;

The routes for controller are specified with annotations. To test this controller, you just need run the ptoject and do a request (GET method) for your project url:

Run: npm start or node app.js

Url to do the request:

http://your_api_url/mycontroller

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

0.0.9

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago