{"id":21182750,"url":"https://github.com/idolgoff/express-sequelize-rest-boilerplate","last_synced_at":"2026-04-17T15:03:06.807Z","repository":{"id":209164252,"uuid":"113411100","full_name":"idolgoff/express-sequelize-rest-boilerplate","owner":"idolgoff","description":"Express sequelize rest boilerplate with typescript for working with existing db (import models) powered by webpack","archived":false,"fork":false,"pushed_at":"2017-12-07T07:06:27.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-14T09:03:17.032Z","etag":null,"topics":["api","express","finale","rapid-development","rest","sequelize","sequelize-auto","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/idolgoff.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,"governance":null}},"created_at":"2017-12-07T06:18:41.000Z","updated_at":"2017-12-07T06:54:05.000Z","dependencies_parsed_at":"2023-11-25T15:25:32.716Z","dependency_job_id":null,"html_url":"https://github.com/idolgoff/express-sequelize-rest-boilerplate","commit_stats":null,"previous_names":["idolgoff/express-sequelize-rest-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idolgoff%2Fexpress-sequelize-rest-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idolgoff%2Fexpress-sequelize-rest-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idolgoff%2Fexpress-sequelize-rest-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idolgoff%2Fexpress-sequelize-rest-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idolgoff","download_url":"https://codeload.github.com/idolgoff/express-sequelize-rest-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243652707,"owners_count":20325611,"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":["api","express","finale","rapid-development","rest","sequelize","sequelize-auto","typescript","webpack"],"created_at":"2024-11-20T17:57:50.919Z","updated_at":"2026-04-17T15:03:06.706Z","avatar_url":"https://github.com/idolgoff.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server side boilerplate with TypeScript, Sequelize...\n\nThis is a boilerplate for development rest api using existing database\nIt allows to generate models from db and use them after with minimum hand correction\n\nIt uses express, finale, sequelize, sequelize-auto, typescript \nPowered by webpack or ts-node-dev with server auto-reload\n\n## Structure\n```bash\n\u003e ./_import_models/    - auto imported models\n\u003e ./db/                - models after hand correction\n\u003e ./rest.ts            - apply finale-rest\n\u003e ./index.ts           - main file\n```\n\n## Scripts\n\nFor everyday development and live reloading\n```bash\nnpm run server:dev\n```\n\nFor dev build with webpack\n```bash\nnpm run dev\n```\n\nFor production build with webpack\n```bash\nnpm run build\n```\n\n## Sequelize\n\nImport model from existing database\n\n```bash\nsequelize-auto -h \u003chost\u003e -d \u003cdatabase\u003e -u \u003cuser\u003e -x [password] -p [port]  --dialect [dialect] -c [/path/to/config] -o [/path/to/models] -t [tableName] -C\n```\n\n## Auto import\n\nImport works pretty well but after that be careful with table def.types\nAdding _as_ lets it work with ts-node-dev server without errors \n\n```typescript\n export const getModels = function(seq:sequelize.Sequelize):ITables {\n   const tables:ITables = {\n     spCats: seq.import(path.join(__dirname, './sp_cats')) → as def.spCatsModel ←,\n     spPurchases: seq.import(path.join(__dirname, './sp_purchases')) → as def.spPurchasesModel ←,\n   };\n   return tables;\n };\n ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidolgoff%2Fexpress-sequelize-rest-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidolgoff%2Fexpress-sequelize-rest-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidolgoff%2Fexpress-sequelize-rest-boilerplate/lists"}