{"id":14967395,"url":"https://github.com/camesine/typescript-restful-starter","last_synced_at":"2025-05-02T22:31:22.073Z","repository":{"id":27176534,"uuid":"88801396","full_name":"camesine/Typescript-restful-starter","owner":"camesine","description":"Node.js + ExpressJS + Joi + Typeorm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai","archived":false,"fork":false,"pushed_at":"2023-02-12T04:44:51.000Z","size":688,"stargazers_count":110,"open_issues_count":13,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T13:18:12.832Z","etag":null,"topics":["chai","clustering","commonjs","cors","cpu","es2015","expressjs","jwt","mocha","nodejs","rest-api","sequelize","tslint","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camesine.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-04-19T23:55:08.000Z","updated_at":"2024-08-23T14:24:19.877Z","dependencies_parsed_at":"2023-02-13T18:55:56.652Z","dependency_job_id":null,"html_url":"https://github.com/camesine/Typescript-restful-starter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camesine%2FTypescript-restful-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camesine%2FTypescript-restful-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camesine%2FTypescript-restful-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camesine%2FTypescript-restful-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camesine","download_url":"https://codeload.github.com/camesine/Typescript-restful-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252116245,"owners_count":21697342,"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","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":["chai","clustering","commonjs","cors","cpu","es2015","expressjs","jwt","mocha","nodejs","rest-api","sequelize","tslint","typescript"],"created_at":"2024-09-24T13:37:59.721Z","updated_at":"2025-05-02T22:31:17.064Z","avatar_url":"https://github.com/camesine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript-restful-starter\nNode.js + ExpressJS + TypeOrm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai + Supertest\n------------\n# What use is this Starter App?\n- **JWT** for protecting routes.\n- **Clustering mode** for loading many forks depending of the CPU's units.\n- **Typeorm** for ORM.\n- **ES2015** the lastest javascript version has promises and async/await\n- **Mocha - Chai** for testing\n- **Supertest** to load the entire server into the tests seamlessly\n\n## Structure\n```json\n/app\n\t/controllers (Controllers of the app)\n\t/middlewares (Middlewares for the routes of the app)\n\t/routes (Routes for Controllers of the app)\n\t/service (Services for using in any Controller)\n\t/entity (Models configuration for use)\n\t/repository (Custom queries)\n/config\n\t/Router.ts (Config file for Routing)\n\t/Database (DB configuration for use)\n\t/Server.ts (Server configuration)\nconfig.ts (Config file for the app)\ntsconfig.json (File configuration typescript)\ntslint.json (File configuration rules typescript)\nIndex.ts (Main file to start the app)\n```\n# Install\n1. First clone this repository.\n\t\t\n\t\tgit@github.com:camesine/Typescript-restful-starter.git\n\t\t\n2. Download all dependencies.\n\n\t\tnpm install\n\t\t\n3. Edit the file `./env` and add config database like:\n\n```js\n#\n# APPLICATION\n#\nAPP_NAME=restful-starter-server\nAPP_SCHEMA=http\nAPP_HOST=localhost\nAPP_PORT=3000\n\nAPP_SECRET=HltH3R3\n\n\n#\n# MySQL DATABASE\n#\n# mysql or mariadb\nTYPEORM_CONNECTION=mariadb\nTYPEORM_HOST=localhost\nTYPEORM_PORT=3306\nTYPEORM_USERNAME=root\nTYPEORM_PASSWORD=root\nTYPEORM_DATABASE=test\nTYPEORM_SYNCHRONIZE=true\nTYPEORM_LOGGING=error\nTYPEORM_LOGGER=advanced-console\n\n#\n# PATH STRUCTRUE\n#\nTYPEORM_ENTITIES=app/models/**/*.ts\nTYPEORM_ENTITIES_DIR=app/models\n```\n\n# Start App\nWhen execute any of this commands the app start with clustering, creating many cluster apps depending of the numbers of CPU's your computer had.\n### Development: In Development mode, the express app is started with nodemon for automatic refresh when changes are made.\n\tnpm run dev\n### Test: Run test in development environment\n\tnpm test\n### Production: Run app in production environment\n\tnpm start\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamesine%2Ftypescript-restful-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamesine%2Ftypescript-restful-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamesine%2Ftypescript-restful-starter/lists"}