ork

18.1.14 • Public • Published

USAGE

  • ork
$ ork
  • Install
$ sudo npm install ork -g
  • Generate
$ ork-generate -m path -t [module]
  • Run
$ ork -c file.[yml, yaml, json] -m path
  • Open

http://localhost:3000/moduleName Launch

CREATE A MODULE REST

  • Folder structure
$ my-project  
    config.json
    my-module
        - package.json
        - routes
            - app.js     
  • config.json
{
    "name" : "my-project",
    "modules" : ["my-module"]
}
  • package.json
{
    "name" : "my-module",
    "dependencies" : {}
}
  • routes/app.js
const {Router} = require('ork');
const router = new Router();
 
router.get('/hello', (req, res, next) => {
    let message = 'Hello World';
    res.status(200).json({message});
});
 
module.exports = router;
 
  • Run
$ ork -c config.json -m ./
  • Open

http://localhost:3000/my-module/hello Launch

Readme

Keywords

Package Sidebar

Install

npm i ork

Weekly Downloads

1

Version

18.1.14

License

MIT

Last publish

Collaborators

  • willguitaradmfar