{"id":22466447,"url":"https://github.com/coreh/feathers-sequelize-replicated","last_synced_at":"2025-03-27T15:18:47.620Z","repository":{"id":66096195,"uuid":"107195826","full_name":"coreh/feathers-sequelize-replicated","owner":"coreh","description":"Fork of feathers-sequelize","archived":false,"fork":false,"pushed_at":"2017-11-28T15:53:09.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T19:12:49.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/feathersjs/feathers-sequelize","language":"JavaScript","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/coreh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/contributing.md","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-10-17T00:00:32.000Z","updated_at":"2017-10-17T18:16:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"37121279-2d4b-4329-aca6-8246b64b42cd","html_url":"https://github.com/coreh/feathers-sequelize-replicated","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/coreh%2Ffeathers-sequelize-replicated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreh%2Ffeathers-sequelize-replicated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreh%2Ffeathers-sequelize-replicated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreh%2Ffeathers-sequelize-replicated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreh","download_url":"https://codeload.github.com/coreh/feathers-sequelize-replicated/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245868328,"owners_count":20685609,"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":[],"created_at":"2024-12-06T10:12:19.176Z","updated_at":"2025-03-27T15:18:47.597Z","avatar_url":"https://github.com/coreh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feathers-sequelize\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs/feathers-sequelize.svg)](https://greenkeeper.io/)\n\n[![Build Status](https://travis-ci.org/feathersjs/feathers-sequelize.png?branch=master)](https://travis-ci.org/feathersjs/feathers-sequelize)\n[![Code Climate](https://codeclimate.com/github/feathersjs/feathers-sequelize.png)](https://codeclimate.com/github/feathersjs/feathers-sequelize)\n[![Test Coverage](https://codeclimate.com/github/feathersjs/feathers-sequelize/badges/coverage.svg)](https://codeclimate.com/github/feathersjs/feathers-sequelize/coverage)\n[![Dependency Status](https://img.shields.io/david/feathersjs/feathers-sequelize.svg?style=flat-square)](https://david-dm.org/feathersjs/feathers-sequelize)\n[![Download Status](https://img.shields.io/npm/dm/feathers-sequelize.svg?style=flat-square)](https://www.npmjs.com/package/feathers-sequelize)\n[![Slack Status](http://slack.feathersjs.com/badge.svg)](http://slack.feathersjs.com)\n\n\u003e A service adapter for [Sequelize](http://sequelizejs.com), an SQL ORM\n\n## Installation\n\n```bash\nnpm install feathers-sequelize --save\n```\n\n## Documentation\n\nPlease refer to the [Feathers database adapter documentation](http://docs.feathersjs.com/databases/readme.html) for more details or directly at:\n\n- [Sequelize](http://docs.feathersjs.com/databases/sequelize.html) - The detailed documentation for this adapter\n- [Extending](http://docs.feathersjs.com/databases/extending.html) - How to extend a database adapter\n- [Pagination and Sorting](http://docs.feathersjs.com/databases/pagination.html) - How to use pagination and sorting for the database adapter\n- [Querying](http://docs.feathersjs.com/databases/querying.html) - The common adapter querying mechanism\n\n### Complete Example\n\nHere is an example of a Feathers server with a `todos` SQLite Sequelize Model:\n\n```js\nimport path from 'path';\nimport feathers from 'feathers';\nimport rest from 'feathers-rest';\nimport bodyParser from 'body-parser';\nimport Sequelize from 'sequelize';\nimport service from 'feathers-sequelize';\n\nconst sequelize = new Sequelize('sequelize', '', '', {\n  dialect: 'sqlite',\n  storage: path.join(__dirname, 'db.sqlite'),\n  logging: false\n});\nconst Todo = sequelize.define('todo', {\n  text: {\n    type: Sequelize.STRING,\n    allowNull: false\n  },\n  complete: {\n    type: Sequelize.BOOLEAN,\n    defaultValue: false\n  }\n}, {\n  freezeTableName: true\n});\n\n// Create a feathers instance.\nconst app = feathers()\n  // Enable REST services\n  .configure(rest())\n  // Turn on JSON parser for REST services\n  .use(bodyParser.json())\n  // Turn on URL-encoded parser for REST services\n  .use(bodyParser.urlencoded({ extended: true }));\n\n// Removes all database content\nTodo.sync({ force: true });\n\n// Create an sqlite backed Feathers service with a default page size of 2 items\n// and a maximum size of 4\napp.use('/todos', service({\n  Model: Todo,\n  paginate: {\n    default: 2,\n    max: 4\n  }\n}));\n\n// Start the server\napp.listen(3030);\n\nconsole.log('Feathers Todo Sequelize service running on 127.0.0.1:3030');\n```\n\nYou can run this example by using `node examples/app` and going to [localhost:3030/todos](http://localhost:3030/todos). You should see an empty array. That's because you don't have any Todos yet but you now have full CRUD for your new todos service.\n\n## License\n\nCopyright (c) 2015\n\nLicensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreh%2Ffeathers-sequelize-replicated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreh%2Ffeathers-sequelize-replicated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreh%2Ffeathers-sequelize-replicated/lists"}