{"id":19602316,"url":"https://github.com/acodercat/catk","last_synced_at":"2026-01-31T16:35:52.101Z","repository":{"id":57195011,"uuid":"58982620","full_name":"acodercat/catk","owner":"acodercat","description":"A Restfull framework based on KOA using MVC conventions,Reference to the design idea of rails framework","archived":false,"fork":false,"pushed_at":"2016-05-19T09:53:00.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T02:56:08.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acodercat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-17T02:11:02.000Z","updated_at":"2023-04-11T07:34:35.000Z","dependencies_parsed_at":"2022-09-16T05:14:20.451Z","dependency_job_id":null,"html_url":"https://github.com/acodercat/catk","commit_stats":null,"previous_names":["willcodecat/catk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acodercat/catk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acodercat%2Fcatk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acodercat%2Fcatk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acodercat%2Fcatk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acodercat%2Fcatk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acodercat","download_url":"https://codeload.github.com/acodercat/catk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acodercat%2Fcatk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28947696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T09:23:32.040Z","updated_at":"2026-01-31T16:35:52.086Z","avatar_url":"https://github.com/acodercat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# catk #\n\nA Restfull framework based on KOA using MVC conventions,Reference to the design idea of rails framework\n# github #\n\n    https://github.com/acodercat/catk.git\n## Install ##\n\n    npm install catk -g\n## create a catk project ##\n\n    catk new project_name\n    cd project_name\n    npm install\n    npm start\n## create a controller ##\n\n    1.catk generate controller [controller_name]\n    2.catk generate controller [path/controller_name]\n## create a model ##\n\n    1.catk generate model [model_name]\n    2.catk generate model [path/model_name]\n## router ##\n\n    in \"./config/routes.js\"\n    1.'MODELS PATH': 'ControllerName.Action',//'post /auth/login': 'AuthController.login',\n    2.'MODELS PATH': 'Path/ControllerName.Action',//'post /auth/login': 'User/AuthController.login',\n    3.'MODELS PATH': function,//'post /auth/login': function *(next){\n        yield next;\n\t},\n## config ##\n\n    in \"./config\"\n    config.[file_name].[key]//config.auth.key\n    You can new a config file\n## upload file ##\n\n    example:\n    \n    const parse = require('co-busboy');\n    const moment = require('moment');\n    \n    upload: function *(next){\n\t\tlet parts = parse(this);\n\t\tlet part;\n\t\twhile (part = yield parts) {\n\t\t\tif (part.length) {\n\t\t\t\tconsole.log('key: ' + part[0]);\n\t\t      \tconsole.log('value: ' + part[1]);\n\t\t     } else if(part.filename != ''){\n\t\t     \tlet ext = path.extname(part.filename);\n\t\t      \tlet stream = fs.createWriteStream(path.join('./assets/images', (Math.ceil(Math.random()*9999)).toString()+moment().unix()+ext));\n\t\t\t    part.pipe(stream);\n\t\t\t    console.log('uploading %s -\u003e %s', part.filename, stream.path);\n\t\t    }\n\t \t}\n\n\t},\n## models ##\n    \n    ORM Sequelize http://static.html-js.com/sequelizejs/index.html\n    in \"./app/Modles\"\n    models.[model_name].[action]//modles.user.login();\n    You can new a modle file\n## global function ##\n    \n    in \"./lib/function.js\"\n    define function like this:\n    is_login:function(){\n        \n\t\tcoding.....\n\t}\n    You can invoke this function from anywhere in the code.like this is_login();\n## about me ##\n    \n    name:CoderCat\n    email:1067302838@qq.com\n    blog:http://coder.cat\n## directory structure ##\n\n    .\n    ├── app\n    │   └── controller\n    |   |    └── UserController.js\n    |   └── models\n    |   |    └── User.js\n    |   └── logs\n    |        └── 2016.5.10.text\n    ├── config\n    |   ├── globals.js\n    |   └── models.js\n    |   └── routes.js\n    |   └── auth.js\n    ├── lib\n    |   ├── core.js\n    |   └── function.js\n    ├── app.js\n    ├── assets\n    |   └──images\n    ├── package.json\n    └── README.md\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facodercat%2Fcatk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facodercat%2Fcatk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facodercat%2Fcatk/lists"}