{"id":22514687,"url":"https://github.com/jdizm/node-express-sequelize","last_synced_at":"2026-04-10T00:07:05.515Z","repository":{"id":178183178,"uuid":"661389155","full_name":"JDIZM/node-express-sequelize","owner":"JDIZM","description":"A demo node/express API project using sequelize and postgres with schema migrations","archived":false,"fork":false,"pushed_at":"2024-04-23T16:35:19.000Z","size":206,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T01:50:49.792Z","etag":null,"topics":["api","docker","express","node","postgresql","sequelize","sql"],"latest_commit_sha":null,"homepage":"","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/JDIZM.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":"2023-07-02T17:31:36.000Z","updated_at":"2024-08-15T15:43:34.000Z","dependencies_parsed_at":"2024-08-15T18:34:26.037Z","dependency_job_id":"960fb3ac-71c9-4faf-82c4-c043d11a4e7d","html_url":"https://github.com/JDIZM/node-express-sequelize","commit_stats":null,"previous_names":["jdizm/node-express-sequelize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JDIZM/node-express-sequelize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDIZM%2Fnode-express-sequelize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDIZM%2Fnode-express-sequelize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDIZM%2Fnode-express-sequelize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDIZM%2Fnode-express-sequelize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JDIZM","download_url":"https://codeload.github.com/JDIZM/node-express-sequelize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDIZM%2Fnode-express-sequelize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264569445,"owners_count":23629602,"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","docker","express","node","postgresql","sequelize","sql"],"created_at":"2024-12-07T03:20:28.535Z","updated_at":"2025-12-30T20:06:42.040Z","avatar_url":"https://github.com/JDIZM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-express-sequelize\n\n- node\n- express\n- sequelize\n- postgresql\n- pnpm\n- docker\n\n## Installation\n\n### package manager\n\nThis project uses pnpm to manage dependencies. Install pnpm with `npm install -g pnpm` and run `pnpm install` to install dependencies.\n\nsee https://pnpm.io/installation for more information on pnpm.\n\n### volta\n\nThis project uses volta to manage node versions. Install volta and run `volta install` to install the correct node version.\n\nTo install volta run the following command in the terminal.\n\n```\ncurl https://get.volta.sh | bash\n```\n\n## Usage\n\nSpin up a local docker container with postgresql db using the following command:\n\n```\ndocker compose up -d\n```\n\nThen we will need to run the migrations and seed the db\n\n### run migrations\n\n- `npx sequelize-cli db:migrate`\n- `npx sequelize-cli db:migrate:undo:all`\n\n### seed the db\n\n- `npx sequelize-cli db:seed:all`\n\n### dev server\n\nstart the dev server with `npm run dev` this will spin up a docker container with postgresql and run the app in watch mode.\n\n### make a request to fetch all users\n\nmake a GET request to http://localhost:3000/users\n\nyou can use something like [insomnia](https://insomnia.rest/), [postman](https://www.postman.com/) or [httpie](https://httpie.io/cli) to make the request.\n\nYou should see a response like this with a user and it's associated bar model:\n\n```json\n{\n  \"users\": [\n    {\n      \"id\": \"1f63b2ad-4273-4fdd-b6a7-dcadf45a2cbe\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\",\n      \"email\": \"johndoe@example.com\",\n      \"createdAt\": \"2023-07-02T21:38:21.154Z\",\n      \"updatedAt\": \"2023-07-02T21:38:21.154Z\",\n      \"Bar\": {\n        \"id\": 1,\n        \"userId\": \"1f63b2ad-4273-4fdd-b6a7-dcadf45a2cbe\",\n        \"createdAt\": \"2023-07-02T21:38:21.161Z\",\n        \"updatedAt\": \"2023-07-02T21:38:21.161Z\"\n      }\n    }\n  ]\n}\n```\n\n## Build the api with docker\n\nreplace the `POSTGRES_HOST` with `host.docker.internal` in the .env file to run the app with docker.\n\n```\nPOSTGRES_HOST=host.docker.internal\n```\n\n### Build the image\n\n`docker build -t node-express-sequelize .`\n\n### Run the image\n\n`docker run -d -p 3000:3000 node-express-sequelize`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdizm%2Fnode-express-sequelize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdizm%2Fnode-express-sequelize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdizm%2Fnode-express-sequelize/lists"}