{"id":20604801,"url":"https://github.com/themost-framework/themost","last_synced_at":"2025-10-05T17:10:34.377Z","repository":{"id":25729357,"uuid":"79987177","full_name":"themost-framework/themost","owner":"themost-framework","description":"MOST Web Framework 2.0 Codename Blueshift","archived":false,"fork":false,"pushed_at":"2025-01-22T05:04:53.000Z","size":7333,"stargazers_count":8,"open_issues_count":27,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-02T10:36:08.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/themost-framework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-25T05:53:22.000Z","updated_at":"2025-01-22T05:04:58.000Z","dependencies_parsed_at":"2024-06-18T21:34:05.833Z","dependency_job_id":"b83c46b8-6334-4f0f-aec7-f2146f476fb7","html_url":"https://github.com/themost-framework/themost","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/themost-framework/themost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themost-framework%2Fthemost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themost-framework%2Fthemost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themost-framework%2Fthemost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themost-framework%2Fthemost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themost-framework","download_url":"https://codeload.github.com/themost-framework/themost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themost-framework%2Fthemost/sbom","scorecard":{"id":879305,"data":{"date":"2025-08-11","repo":{"name":"github.com/themost-framework/themost","commit":"1f1fbdbfbc2f0f6b7d81bedc28247874b5ee52aa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"123 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-wxhq-pm8v-cw75","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-3w5v-p54c-f74x","Warn: Project is vulnerable to: GHSA-6x77-rpqf-j6mw","Warn: Project is vulnerable to: GHSA-hwcf-pp87-7x6p","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-7x7c-qm48-pq9c","Warn: Project is vulnerable to: GHSA-rc3x-jf5g-xvc5","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q","Warn: Project is vulnerable to: GHSA-x2fc-mxcx-w4mf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-v923-w3x8-wh69","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-p493-635q-r6gr","Warn: Project is vulnerable to: GHSA-3965-hpx2-q597","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-fxwf-4rqh-v8g3","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-xfhh-g9f5-x4m4","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-34r7-q49f-h37c","Warn: Project is vulnerable to: GHSA-c9f4-xj24-8jqx","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-9m6j-fcg5-2442","Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc","Warn: Project is vulnerable to: GHSA-rqff-837h-mm52","Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2","Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j","Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5","Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T07:26:23.018Z","repository_id":25729357,"created_at":"2025-08-24T07:26:23.018Z","updated_at":"2025-08-24T07:26:23.018Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278234031,"owners_count":25953075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-16T09:24:54.120Z","updated_at":"2025-10-05T17:10:34.331Z","avatar_url":"https://github.com/themost-framework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# themost\nMOST Web Framework 2.0 **Codename Blueshift**\n\nThe new version of MOST Web Framework\ncomes with a set of new features for building modern data-driven web applications and services.\n\n## Changelog\n\nView MOST Web Framework changelog [here](CHANGELOG.md)\n\n## Generate a new application\n\nInstall [MOST Web Framework CLI](http://github.com/kbarbounakis/most-web-cli) globally:\n\n    npm install @themost/cli -g\n    \nand generate a new project by executing:\n\n    themost generate new project \u003cproject name\u003e\n    \nwhere [project name] is the name of the project which is going to be generated e.g.\n    \n    themost generate new project test-app\n\nMOST Web Framework approaches a web application structure with a wind set of naming conventions. \nSo, a classic application structure seems like:\n\n    + app\n        + assets\n            ...\n        + vendor\n            ...\n    + server\n        + controllers\n            root-controller.js\n        + config\n            + models\n                Thing.json\n                User.json\n                Group.json\n                ...\n            app.json\n            routes.json\n        + views\n            + root\n                index.html.ejs\n            + shared\n                master.html.ejs\n                    \n                \nNavigate to new project directory and start application by executing:\n    \n    npm run serve\n\n## Use Controllers\n\nControllers are classes which handle requests and are stored in server/controllers \ndirectory.\n\n\n    //# server/controllers/hello-controller.js\n    \n    import HttpBaseController from '@themost/web/controllers/base';\n    import {httpController,httpGet, httpAction} from '@themost/web/decorators';\n    \n    @httpController()\n    export default class RootController extends HttpBaseController {\n        \n        constructor(context) {\n            super(context);\n        }\n        \n        /**\n         * GET /hello.html\n         * @returns {Promise\u003cany\u003e}\n         */\n        @httpGet()\n        @httpAction('hello')\n        hello() {\n            return Promise.resolve({\n                \"message\": \"Hello World!\"\n            });\n        }\n        \n    }  \n\nGenerate a new controller by executing the following command:\n\n    themost generate controller \u003ccontroller name\u003e\n    \ne.g.\n\n    themost generate controller Test\n\nThis command will generate a new controller in server/controllers/test-controller.js.\nThe new module exports a default class named TestController. TestController class extends HttpBaseController class which\nis one of the available controller classes of @themost.\nThe framework uses the above naming convention (test-controller) to identify an HTTP controller available to handle requests.\n\n@themost uses EcmaScript decorators for defining HTTP controllers actions and methods.\nAn HTTP controller class has @httpController() decorator to let framework identify it as \na valid HTTP controller.\n\n    \n    @httpController()\n    export default class RootController extends HttpBaseController \n    ...\n\nAn instance method of an HTTP controller may be marked as an HTTP action by defining one or more of the\navailable decorators for HTTP actions.\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return Promise.resolve({\n            \"message\": \"Hello World!\"\n        });\n    }\n    \nThese decorators are:\n\n- @httpGet() to handle GET requests\n- @httpPost() to handle POST requests\n- @httpPut() to handle PUT requests\n- @httpDelete() to handle DELETE requests\n- @httpPatch() to handle PATCH requests\n- @httpHead()  to handle HEAD requests\n\n@httpAction() decorator is used to define an HTTP action name\n\n    @httpGet()\n    @httpAction('hello')    \n    hello() {\n    ...\n    }\n\n#### HTTP results\n\nThe result of an HTTP action may be an instance of HttpResult class or any other class which derives from HttpResult class.\n\n\n###### HttpController#json(any)\n\nReturns a application/json result\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.json({\n            \"message\": \"Hello World!\"\n        });\n    }    \n\n###### HttpController#xml(any)\n\nReturns an application/xml result\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.xml({\n            \"message\": \"Hello World!\"\n        });\n    } \n\n###### HttpController#content(string)\n\nReturns a text/html content result\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.view(`\n        \u003ch2\u003eHello World!\u003c/h2\u003e\n        `);\n    } \n\n###### HttpController#view(any)\n\nReturns a text/html result\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.view({\n            \"message\": \"Hello World!\"\n        });\n    } \n    \n###### HttpController#file(physicalPath, fileName)\n\nReturns a content result based on the mime type of the physical file\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.file(path.resolve(process.cwd(),'./app/assets/hello.pdf'));\n    } \n\n###### HttpController#redirect(url)\n\nRedirects the current HTTP request\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return this.redirect('/login.html');\n    } \n\n@themost uses a set of view engines for rendering content:\n\n**EJS View Engine**\n\nbased on [Embedded JavaScript templates](https://github.com/mde/ejs)\n\n    \u003cdiv class=\"container\"\u003e\n        \u003cdiv class=\"row\"\u003e\n            \u003cdiv class=\"col-lg-12 text-center\"\u003e\n                \u003ch2 class=\"mt-5\"\u003e\u003c%=model.message%\u003e\u003c/h2\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\n**Vash View Engine** \n\nbased on [Vash, Razor syntax, for JavaScript templates](https://github.com/kirbysayshi/vash)\n\n    \u003chtml lang=\"en\"\u003e\n        \u003chead\u003e\u003ctitle\u003eMOST Web Framework\u003c/title\u003e\u003c/head\u003e\n        \u003cbody\u003e\n            \u003ch2\u003e@model.message\u003c/h2\u003e\n        \u003c/body\u003e\n    \u003c/html\u003e\n\n**Jade View Engine** \n\nbased on [Pug – robust, elegant, feature rich template engine for Node.js](https://github.com/pugjs/pug)\n\n    doctype html\n    html(lang=\"en\")\n        head\n            title MOST Web Framework\n        body\n            h2= model.message\n\n**AngularJS for Server**\n\n@themost presents an new template engine based on the popular [AngularJS 1.x framework](https://github.com/angular/angular.js)\nThis template is running in paraller with other templates engines and allows the use of AngularJS in server-side rendering.\n\nThe following example contains an AngularJS server module and a simple directive which includes a hello message in an element:\n\n    //# server/modules/server-app.js\n    /**\n     * Initializes angular server application\n     * @param angular\n     */\n    export function bootstrap(angular) {\n        let serverExtensions = angular.module('server-extensions',[]);\n        serverExtensions\n            .directive('serverHello', function() {\n                return {\n                    restrict: 'A',\n                    scope: {\n                        serverHello: '='\n                    },\n                    link: function (scope, element) {\n                        element.html(scope.serverHello);\n                    }\n                };\n            });\n        return angular.module('server',['server-extensions']);\n    }\n\n\nInclude the following html markup:\n\n    \u003cp server-hello=\"'This is a hello message from server application'\"\u003e\u003c/p\u003e\n    \ne.g.\n\n    \u003cdiv class=\"container\"\u003e\n        \u003cdiv class=\"row\"\u003e\n            \u003cdiv class=\"col-lg-12 text-center\"\u003e\n                \u003ch2 class=\"mt-5\"\u003e\u003c%=model.message%\u003e\u003c/h2\u003e\n                \u003cp server-hello=\"'This is a hello message from server application'\"\u003e\u003c/p\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\nand start using AngularJS directives in any server-side view.\n\nThe result of an HTTP action may be also a Promise of any object (including an instance of HttpResult class).\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return Promise.resolve({\n            \"message\": \"Hello World!\"\n        });\n    }\n    \nor\n\n    @httpGet()\n    @httpAction('hello')\n    hello() {\n        return new Promise((resolve, reject) =\u003e {\n            //...\n            return resolve({\n               \"message\": \"Hello World!\"\n           });\n        });\n    }\n\n## Use routing\n\nMOST Web Framework holds application routings in server/config/routes.json file. \n\n    [\n        {\n            \"url\": \"/?\",\n            \"controller\": \"root\",\n            \"action\": \"index\"\n        },\n        {\n            \"url\": \"/:action.html\",\n            \"controller\": \"root\",\n            \"format\": \"html\"\n        },\n        {\n            \"url\": \"/:action.json\",\n            \"controller\": \"root\",\n            \"format\": \"json\"\n        },\n        {\n            \"url\": \"/:action.xml\",\n            \"controller\": \"root\",\n            \"format\": \"xml\"\n        },\n        {\n            \"url\": \"/{controller:plural}/?\",\n            \"action\": \"index\"\n        },\n        {\n            \"url\": \"/{controller:plural}/:action.html\",\n            \"format\": \"html\"\n        },\n        {\n            \"url\": \"/{controller:plural}/:action.json\",\n            \"format\": \"json\"\n        },\n        {\n            \"url\": \"/{controller:plural}/:action.xml\",\n            \"format\": \"xml\"\n        }\n    ]\n\nAn application route may have a set of parameters that are defined with a colon followed by parameter name e.g. /test/:id/edit.html \n\n    {\n        \"url\": \"/:action.html\",\n        \"controller\": \"root\",\n        \"format\": \"html\"\n    }\n\nThe example above defines an application route for each action of RootController. \nThe static parameter [controller] defines the controller which is going to serve the action. The [action] parameter defines the target action. \nThe [format] parameter defines the content-type of the action result.\n\nAny application route may have typed route parameters.\n\n    /users/{id:int}/edit.json\n    \nThis route defines a parameter named [id] which it must be an integer. Any other value will be ignored. Typed route parameters are:\n\nFormat | Type |\n--- | --- |\n{param:int} | Defines an integer parameter (e.g. /users/12450/edit.json )\n{param:boolean} | Defines a boolean parameter\n{param:float} | Defines a float parameter\n{param:guid} | Defines a GUID parameter e.g. /users/2812EAEE-29C5-4810-AD9C-E6A50E97DE40/edit.json is served based on the following route: /users/{id:guid}/edit.json\n{param:plural} | Defines a string parameter that is used with its plural. This typed parameter is used for controller names e.g. /users/100/edit.html is served based on /{controller:plural}/{id:int}/edit.html where finally controller parameter is \"user\".\n{param:date} | Defines a DateTime parameter wrapped in single quotes e.g. /orders/calculate('2018-02-01') is served based on the following route: /orders/calculate\\\\({targetDate:date}\\\\)\n{param:string} | Defines a string parameter wrapped in single quotes e.g. /users('admin@example.com')/edit.json is served based on the following route: /users\\\\({email:date}\\\\)/edit.json\n\nRoute parameters may be passed as action arguments.\n\n    import HttpBaseController from '@themost/web/controllers/base';\n    import {httpController,httpGet, httpAction} from '@themost/web/decorators';\n    \n    @httpController()\n    export default class TestController extends HttpBaseController {\n        \n        constructor(context) {\n            super(context);\n        }\n        \n        ...\n    \n        @httpGet()\n        @httpAction('multiply')\n        multiply(a, b) {\n            return Promise.resolve({\n                result: a * b\n            });\n        }\n        \n        ...\n        \n    }\n\nThe TestController.multiply(a,b) has two float arguments. A route for this action may be:\n\n    {\n        \"url\": \"/test/multiply\\\\({a:float},{b:float}\\\\)\",\n        \"controller\": \"test\",\n        \"action\": \"multiply\",\n        \"format\": \"json\"\n    }\n\nAn HTTP request on /test/multiply(4.5,5.5) will produce the following response:\n\n    {\n        \"result\": 24.75\n    }\n\nAny other request (like /test/multiply(x,5.5)) will fail with 404 Not Found HTTP result\n\nAn HTTP controller action may validate any parameter with @httpParam decorator. \nThis powerfull decorator allows a final parameter validation before the execution of an HTTP action.\n\n    \n    import HttpBaseController from '@themost/web/controllers/base';\n    import {httpController,httpGet, httpAction} from '@themost/web/decorators';\n    \n    @httpController()\n    export default class TestController extends HttpBaseController {\n        \n        constructor(context) {\n            super(context);\n        }\n        \n        ...\n    \n        @httpGet()\n        @httpParam({ name: \"b\", type:\"NonNegativeNumber\" })\n        @httpParam({ name: \"a\", type:\"NonNegativeNumber\" })\n        @httpAction('multiply')\n        multiply(a, b) {\n            return Promise.resolve({\n                result: a * b\n            });\n        }\n        \n        ...\n        \n    }\n\nIn this case any HTTP request where a or b parameter is a negative number (e.g. /test/multiply(-2.5,5.5)) will fail with 400 Bad Request HTTP error. \n\nNote: @httpParam() decorators must be placed in reverse order.\n\nAn @httpParam decorator may have the following attributes\n\nAttribute | Description\n--- | ---\nname | Defines the argument name\ntype | Defines the argument type based on application defined types (e.g. Integer, NonNegativeInteger, PositiveInteger, Email, Date, DateTime, Number etc.)\nrequired | Indicates whether this parameter is required or not even if this is not described in application route\nminLength | Defines the minimum length of a parameter\nmaxLength | Defines the maximum length of a parameter\nminValue | Defines the minimum value for the given parameter\nmaxValue | Defines the maximum value for the given parameter\nmessage | Defines a validation message for this parameter\npattern | Defines a regular expression for the given parameter\n\n\n## Use static content\n\nA @themost web application may serve static files. HttpApplication#useStaticContent(contentPath) enables the serving of static files of the specified directory.\n\n    //# server/server.js\n    import {HttpApplication} from '@themost/web/app';\n    import path from 'path';\n    import {TraceUtils} from '@themost/common/utils';\n    import {AngularServerModule} from \"@themost/web/angular/module\";\n    import {LocalizationStrategy, I18nLocalizationStrategy} from \"@themost/web/localization\";\n    //initialize app\n    let app = new HttpApplication(path.resolve(__dirname));\n    ...\n    //use static content\n    app.useStaticContent(path.resolve('./app'));\n    ...\n\n## Use data models\n\nMOST Web Framework comes with a built-in powerfull ORM module. [@themost/data](https://github.com/themost-framework/themost-data) has a wide set of features for creating data-driven scalable applications. See further instructions [here](https://github.com/themost-framework/themost-data)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemost-framework%2Fthemost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemost-framework%2Fthemost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemost-framework%2Fthemost/lists"}