{"id":27241009,"url":"https://github.com/adammcodes/content-creators","last_synced_at":"2025-10-15T19:50:34.505Z","repository":{"id":76414806,"uuid":"368601290","full_name":"adammcodes/content-creators","owner":"adammcodes","description":"Practicing fundamentals of TDD and Mocha \u0026 Chai. A project of codecademy's back-end course.","archived":false,"fork":false,"pushed_at":"2021-05-18T16:58:26.000Z","size":688,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T20:18:42.597Z","etag":null,"topics":[],"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/adammcodes.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}},"created_at":"2021-05-18T16:40:24.000Z","updated_at":"2021-05-18T16:58:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f5d7c90-e992-4c7c-8046-70c685f32df7","html_url":"https://github.com/adammcodes/content-creators","commit_stats":null,"previous_names":["adammcodes/content-creators"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adammcodes/content-creators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adammcodes%2Fcontent-creators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adammcodes%2Fcontent-creators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adammcodes%2Fcontent-creators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adammcodes%2Fcontent-creators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adammcodes","download_url":"https://codeload.github.com/adammcodes/content-creators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adammcodes%2Fcontent-creators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279109951,"owners_count":26105906,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-04-10T19:56:22.884Z","updated_at":"2025-10-15T19:50:34.489Z","avatar_url":"https://github.com/adammcodes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Content Creators Contracting\n\n## Project Overview\n\nIn this project, you have been hired by a \"professional\" company, Content Creators Contracting, to write a function\nthat signs their HTTP requests with the proper content types. Normally this behavior is handled\nby the browser, but they really mucked things up in thinking they could solve this problem better. Now none of their files are loading properly.\n\nThey have managed to craft the code to get the file extension from a string containing a filename and store it in a variable called 'extension': `const extension = filename.match(/.*\\.([^\\.]*)$/)[1];`. In this code, if `filename` were equal to 'index.html', the string 'html' would be stored in `extension`. However, they're struggling to write the rest of the function.\n\nIt's up to you to save their site and their business.\n\nYou can view what the final version of this project should look like \u003ca href=\"https://s3.amazonaws.com/codecademy-content/programs/build-apis/projects/build-apis-project-0-content-creators/index.html\" target=\"_blank\"\u003ehere\u003c/a\u003e.\n\nThe goal of this project is to get you running a testing suite and implementing the functionality laid out in the testing suite.\n\n## How To Begin\n\nTo start, download the starting code for this project \u003ca href=\"https://s3.amazonaws.com/codecademy-content/PRO/skill-paths/backend-javascript/projects/content-creators/project-0-content-creators-start.zip\" target=\"_blank\"\u003ehere\u003c/a\u003e. After downloading the zip folder, double click it to uncompress it and access the contents of this project.\n\n## Implementation Details\n\nTo complete this project, your code will need to contain the following:\n\n* A function called `getContentType`, which will take a string representing a filename and return the proper content-type extension. You will need to implement the functionality for determining content types for `'text/html'`, `'text/css'`, `'image/jpeg'`, and `'text/plain'`. For more information on this functionality, run the testing suite (detailed below).\n\nAll of your code should be written in **js/request-logic.js**.  Use the descriptions above and the testing suite (discussed below) to guide implementation of all necessary functionality.\n\nTo demo the site, open **index.html** in your browser (by double clicking **index.html** in a file browser or dragging it into your Internet browser). You will be writing\nJavaScript code that uses new syntax (you will learn more about this later in the intensive),\nso you will need to use the most up-to-date version of Chrome to ensure your code runs correctly. If your\nversion of Chrome is too old, correctly-written code may still not run as expected.\n\n## Testing\n\nA testing suite has been provided for you, checking for all essential functionality and\nedge cases.\n\nTo run these tests, first open the root project directory in your terminal. Then run `npm install` to install\nall necessary testing dependencies (you will only need to do this step once).\nFinally, run `npm run test`. You will see a list of tests that ran with information\nabout whether or not each test passed. After this list, you will see more specific output\nabout why each failing test failed.\n\nAs you implement functionality, run the tests to\nensure you are creating the correctly named function and that it returns the proper values.\nThe tests will additionally help you identify edge cases that you may not have anticipated\nwhen first writing the function.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadammcodes%2Fcontent-creators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadammcodes%2Fcontent-creators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadammcodes%2Fcontent-creators/lists"}