{"id":15674138,"url":"https://github.com/davidep87/koa-sequelize","last_synced_at":"2025-05-06T22:51:13.826Z","repository":{"id":96143659,"uuid":"96042461","full_name":"davidep87/koa-sequelize","owner":"davidep87","description":"koa sequelize boilerplate","archived":false,"fork":false,"pushed_at":"2020-02-29T16:30:22.000Z","size":10,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T03:41:27.971Z","etag":null,"topics":["koa","nodejs","sequelize"],"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/davidep87.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-02T18:46:14.000Z","updated_at":"2023-11-20T17:48:39.000Z","dependencies_parsed_at":"2023-04-04T15:32:24.267Z","dependency_job_id":null,"html_url":"https://github.com/davidep87/koa-sequelize","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/davidep87%2Fkoa-sequelize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidep87%2Fkoa-sequelize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidep87%2Fkoa-sequelize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidep87%2Fkoa-sequelize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidep87","download_url":"https://codeload.github.com/davidep87/koa-sequelize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782467,"owners_count":21803380,"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":["koa","nodejs","sequelize"],"created_at":"2024-10-03T15:43:40.214Z","updated_at":"2025-05-06T22:51:13.819Z","avatar_url":"https://github.com/davidep87.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Node.JS (7.7.1) - KoaJS (2.3) - Sequelize 3.3\n\n#### Before you start the project you have to install the database dialect based on your preference:\n\n`$ npm install --save pg pg-hstore`\n\n`$ npm install --save mysql2`\n\n`$ npm install --save sqlite3`\n\n`$ npm install --save tedious // MSSQL`\n###### or\n`$ yarn add pg pg-hstore`\n\n`$ yarn add mysql2`\n\n`$ yarn add sqlite3`\n\n`$ yarn add tedious // MSSQL`\n\n- ###### Then configure the file database.js in the config directory\n\n- ###### Create e .env file with this variables:\n  - LOCAL_HOST\n  - PRODUCTION_HOST\n  - STAGING_HOST\n  - SECRET_KEY\n  - PORT\n  - DB_USER\n  - DB_PASSWORD\n  - DATABASE\n  - DB_HOST\n\n- ###### In models you can find a ready to use example of Users model\n\n##### How to modify database structure without forcing sync of sequelize:\n  - Create a migration file running this command example in the main dir of the project:\n    - `$ sequelize migration:create --name \"nameOfMigrationFile\" --migrations-path migrations/`\n  - Write logic to change db structure in the new generated file in migrations/\n    - Documentation: http://docs.sequelizejs.com/en/latest/docs/migrations/\n  - Run the command sequelize db:migrate to update database structure\n\n##### NOTE: database models are attached on the koa context so you are able to use it easily around the project like:\n\n`cont users = await ctx.db.models.User.findAll()`\n\n\n###### This project is not ready for production is just a good starting point to approach sequelize and koa\n\n## Author\n[Davide Polano](https://www.mdslab.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidep87%2Fkoa-sequelize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidep87%2Fkoa-sequelize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidep87%2Fkoa-sequelize/lists"}