{"id":21155401,"url":"https://github.com/nuhptr/typescript","last_synced_at":"2026-05-10T02:37:42.453Z","repository":{"id":45475977,"uuid":"436577067","full_name":"nuhptr/typescript","owner":"nuhptr","description":"⚡️🔥 Deep learn and build typescript project from basic until using node framework","archived":false,"fork":false,"pushed_at":"2024-06-02T03:07:59.000Z","size":16309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T08:44:38.778Z","etag":null,"topics":["bun","bundle","expressjs","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/nuhptr.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":"2021-12-09T10:37:50.000Z","updated_at":"2024-06-02T03:08:02.000Z","dependencies_parsed_at":"2024-03-03T09:25:58.533Z","dependency_job_id":"e6f14405-3e41-41e2-9800-64f11d17685e","html_url":"https://github.com/nuhptr/typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuhptr%2Ftypescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuhptr%2Ftypescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuhptr%2Ftypescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuhptr%2Ftypescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuhptr","download_url":"https://codeload.github.com/nuhptr/typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243597838,"owners_count":20316844,"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":["bun","bundle","expressjs","typescript"],"created_at":"2024-11-20T11:18:42.562Z","updated_at":"2026-05-10T02:37:37.414Z","avatar_url":"https://github.com/nuhptr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript-Learn-Code\n\nTypescript Repository Code from basic until expert\n\n## Folder Structure\n\n### Typescript Mas Nusendra\n\n1. [Basic](./typescript-mas-rendra/basic/)\n2. [Design Pattern](./typescript-mas-rendra/design-pattern/)\n    - [Behavioral](./typescript-mas-rendra/design-pattern/behavioral/)\n    - [Creational](./typescript-mas-rendra/design-pattern/creational/)\n    - [Structural](./typescript-mas-rendra/design-pattern/structural/)\n3. [OOP](./typescript-mas-rendra/oop/)\n4. [OOP Case](./typescript-mas-rendra/oop-case/)\n5. [TODO Express](./typescript-mas-rendra/todo-express/)\n\n### Typescript my learn\n\n1. [Basics](./typescript-my-learn/basics/)\n\n    - [Annotation](./adi-explore/basics/annotations/)\n    - [Type Inference](./adi-explore/basics/inference-types/)\n    - [Any Type](./adi-explore/basics/any-type/)\n    - [Function](./adi-explore/basics/functions/)\n    - [Array Type](./adi-explore/basics/arrays-types/)\n    - [Type Aliases](./adi-explore/basics/type-aliases/)\n    - [Objects](./adi-explore/basics/objects/)\n    - [Intersection Types](./adi-explore/basics/intersection-types/)\n    - [Unions](./adi-explore/basics/unions/)\n    - [Literal Types](./adi-explore/basics/literal-types/)\n\n2. [Object Oriented Programming](./adi-explore/object-oriented-programming/)\n\n    - [Access Modifier](./adi-explore/object-oriented-programming/access-modifier/)\n    - [Class Properties](./adi-explore/object-oriented-programming/class-properties/)\n    - [Getter Setter](./adi-explore/object-oriented-programming/getter-setter/)\n    - [Interface](./adi-explore/object-oriented-programming/interface/)\n    - [Generics](./adi-explore/object-oriented-programming/generics/)\n    - [Type Narrowing](./adi-explore/object-oriented-programming/type-narrowing/)\n\n3. [ts express](./adi-explore/ts-express/)\n\nLearn init ts using typescript\n\n4. [ts with axios](./adi-explore/ts-with-axios/)\n\nLearn how to use axios with typescript\n\n### Typescript Rest API\n\n1. [User API Spec](./typescript-restfull-pzn/doc/user.md)\n2. [Address API Spec](./typescript-restfull-pzn/doc/address.md)\n3. [Contact API Spec](./typescript-restfull-pzn/doc/contact.md)\n\nand many more to create a restfull api using typescript and nodejs with express\n\n# Configuration Typescript Project\n\n```bash\nnpm init -y (if you don't have package.json)\npnpm add typescript -D\nnpx tsc --init\n```\n\n## add additional package\n\n-   [nodemon](https://www.npmjs.com/package/nodemon) - pnpm add nodemon -D\n\n## add script to package.json\n\n```json\n   \"scripts\": {\n      \"tsc\" : \"rm -rf build/ \u0026\u0026 tsc\",\n      \"ts\" : \"rm -rf build/ \u0026\u0026 tsc -w\",\n      \"dev\" : \"nodemon ./build\"\n   }\n```\n\n## Then konfiguration in tsconfig.json\n\n```json\n   \"allowJs\": true,\n   \"outDir\": \"./build\",\n   \"forceConsistentCasingInFileNames\": false,\n```\n\n## Run Typescript Build\n\n`ctrl + shift + b -\u003e tsc:build - tsconfig.json`\n\n## Run nodemon\n\n`pnpm dev`\n\n# Express Dependencies\n\n-   [body-parser](https://www.npmjs.com/package/body-parser) - pnpm add body-parser (parse incoming request bodies in a middleware before your handlers, available under the req.body property.)\n-   [morgan](https://www.npmjs.com/package/morgan) - pnpm add morgan (HTTP request logger middleware for node.js) / [winston](https://www.npmjs.com/package/winston) - pnpm add winston (A logger for just about everything.)\n-   [express](https://www.npmjs.com/package/express) - pnpm add express (nodejs framework)\n-   [helmet](https://www.npmjs.com/package/helmet) - pnpm add helmet (secure Express apps by setting HTTP response headers.)\n-   [cors](https://www.npmjs.com/package/cors) - pnpm add cors (a Connect/Express middleware)\n\n-   [compression](https://www.npmjs.com/package/compression) - pnpm add compression (compress response)\n-   [dotenv](https://www.npmjs.com/package/dotenv) - pnpm add dotenv (save credentials from environment)\n\n-   [sequelize](https://www.npmjs.com/package/sequelize) - pnpm add sequelize (Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.)\n-   [sequelize-cli](https://www.npmjs.com/package/sequelize-cli) - pnpm add sequelize-cli (The Sequelize Command Line Interface (CLI))\n-   [mysql2](https://www.npmjs.com/package/mysql2) - pnpm add mysql2 (MySQL client for Node.js with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression, ssl)\n\n-   [bcrypt](https://www.npmjs.com/package/bcrypt) - pnpm add bcrypt (A library to help you hash passwords.)\n-   [express-validator](https://www.npmjs.com/package/express-validator) - pnpm add express-validator (An express.js middleware for validator)\n-   [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken) - pnpm add jsonwebtoken (An implementation of JSON Web Tokens)\n\n# Setup Sequelize ORM\n\n-   Add Dependencies\n\n```bash\npnpm add mysql2 sequelize sequelize-cli\n```\n\n-   Add .sequelizerc in project\n\n```javascript\n// .sequelizerc\nconst path = require(\"path\")\nrequire(\"dotenv\").config()\n\nif (process.env.NODE_ENV == \"development\") {\n    module.exports = {\n        config: path.resolve(\"src/config\", \"database.js\"),\n        \"models-path\": path.resolve(\"src/db\", \"models\"),\n        \"seeders-path\": path.resolve(\"src/db\", \"seeders\"),\n        \"migrations-path\": path.resolve(\"src/db\", \"migrations\"),\n    }\n} else {\n    module.exports = {\n        config: path.resolve(\"build/config\", \"database.js\"),\n        \"models-path\": path.resolve(\"build/db\", \"models\"),\n        \"seeders-path\": path.resolve(\"build/db\", \"seeders\"),\n        \"migrations-path\": path.resolve(\"build/db\", \"migrations\"),\n    }\n}\n```\n\n-   Init sequelize-cli\n\n```bash\nnpx sequelize-cli init\n```\n\n-   Create model dan migrate\n\n```bash\nnpx sequelize-cli model:generate --name user --attributes username:string,password:string --underscored\n```\n\n-   Migrate database to MySql\n\n```bash\nnpx sequelize-cli db:migrate\n# untuk membalikan migrasi\nnpx sequelize-cli db:undo\n```\n\n-   Add Development Dependencies\n\n```bash\npnpm add @types/validator -D\npnpm add @types/bluebird -D\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuhptr%2Ftypescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuhptr%2Ftypescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuhptr%2Ftypescript/lists"}