{"id":13512883,"url":"https://github.com/druchefavour/interview","last_synced_at":"2025-03-31T00:30:51.463Z","repository":{"id":128108387,"uuid":"86181416","full_name":"druchefavour/interview","owner":"druchefavour","description":"A project management app that uses Node.js, Express.js (framework), MySQL (database), Sequelize (orm) and Handlebars (templating)","archived":false,"fork":false,"pushed_at":"2017-04-02T06:26:29.000Z","size":12947,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-01T15:37:33.506Z","etag":null,"topics":["bootstrap","css","expressjs","handlebars","html","javascript","jquery","mvc","mysql","nodejs","sequelize"],"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/druchefavour.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}},"created_at":"2017-03-25T18:57:45.000Z","updated_at":"2017-04-04T14:16:33.000Z","dependencies_parsed_at":"2024-01-13T22:33:52.705Z","dependency_job_id":null,"html_url":"https://github.com/druchefavour/interview","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/druchefavour%2Finterview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druchefavour%2Finterview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druchefavour%2Finterview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druchefavour%2Finterview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druchefavour","download_url":"https://codeload.github.com/druchefavour/interview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399816,"owners_count":20770907,"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":["bootstrap","css","expressjs","handlebars","html","javascript","jquery","mvc","mysql","nodejs","sequelize"],"created_at":"2024-08-01T04:00:33.793Z","updated_at":"2025-03-31T00:30:46.433Z","avatar_url":"https://github.com/druchefavour.png","language":"JavaScript","funding_links":[],"categories":["Web development"],"sub_categories":["NodeJS"],"readme":"# README For This Project Management Tool App\n\nThis task is to extend this project management app. The app uses Node.js, Express.js (framework), MySQL (database), Sequelize (orm) and Handlebars (templating).\n\n## Procedure\n\n* Add in delete links for tasks and people. But only if the user is logged in.\n\n* Add in the appropriate route for the delete to work.\n\n* If a person gets deleted, cascade the delete to extend to the tasks that the person owns.\n\n* This is what the main page should look like if a user is signed in:\n\n![Editing a person](https://github.com/druchefavour/interview/blob/master/main-page.png)\n\n* Also add in this functionality:\n  * when clicking a person on the front end, it will take you to a profile for the person showing all the tasks for that person. In addition, you'll be able to edit the person's name and update the person's name. Upon updating, it will redirect you back to this person's profile.\n    * After complete The profile page looks like this:\n\n![Editing a person](https://github.com/druchefavour/interview/blob/master/editing-a-person.png)\n\n## Sequelize\nThis repository demonstrates the usage of sequelize within an express application.\n\nThe implemented logic is a simple task tracking tool.\n\n1. create a database called projects_db\n  * `mysql -u root`\n  * `create database projects_db;`\n\n2. Adjust the `config/config.json` to fit your environment.\n\n3. install modules in package.json\n  * `npm install`\n\n4. install sequelize cli globally to be able to run migrations on your computer:\n  * `sudo npm install -g sequelize-cli`\n\n5. run your migrations to create your tables\n  * `sequelize db:migrate`\n\n6. start up the app\n  * `nodemon start`\n\n  if you don't have nodemon\n  * `npm start`\n\n7. then in the browser go to http://localhost:3000\n\n\n## The following parts are for your own knowledge. You don't need to do this to setup the app.\n\n1. Want to create a migration:\n  `sequelize migration:create create-\u003ctable name here\u003e`\n\n  edit the migration file\n\n  to run the migration file:\n    `sequelize db:migrate`\n\n  You'll still have to make the model file in the models folder\n\n2. curious of all the commands you can do with sequelize cli?\n  go here: https://github.com/sequelize/cli\n\n3. curious of all the sequelize relationships:\n  http://docs.sequelizejs.com/en/latest/docs/associations/\n\n4. In order to associate the models with each other, we changed the models like this:\n\n  ```js\n  // task.js\n  // ...\n  classMethods: {\n    associate: function(models) {\n      Task.belongsTo(models.Person);\n    }\n  }\n  // ...\n  ```\n\n  ```js\n  // person.js\n  // ...\n  classMethods: {\n    associate: function(models) {\n      Person.hasMany(models.Task)\n    }\n  }\n  // ...\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruchefavour%2Finterview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruchefavour%2Finterview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruchefavour%2Finterview/lists"}