{"id":23744954,"url":"https://github.com/wheeyls/critical-css-server","last_synced_at":"2025-09-04T19:32:17.843Z","repository":{"id":46920991,"uuid":"79959653","full_name":"wheeyls/critical-css-server","owner":"wheeyls","description":"Eliminate render-blocking CSS in above-the-fold content","archived":false,"fork":false,"pushed_at":"2023-01-23T19:25:21.000Z","size":52154,"stargazers_count":28,"open_issues_count":12,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-26T19:39:04.930Z","etag":null,"topics":["above-the-fold","critical-css","critical-path","css","inline-css","nodejs","pagespeed","phantomjs"],"latest_commit_sha":null,"homepage":"","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/wheeyls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-24T22:10:32.000Z","updated_at":"2023-12-12T17:43:20.000Z","dependencies_parsed_at":"2023-01-24T11:45:16.301Z","dependency_job_id":null,"html_url":"https://github.com/wheeyls/critical-css-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheeyls%2Fcritical-css-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheeyls%2Fcritical-css-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheeyls%2Fcritical-css-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheeyls%2Fcritical-css-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wheeyls","download_url":"https://codeload.github.com/wheeyls/critical-css-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231823565,"owners_count":18431948,"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":["above-the-fold","critical-css","critical-path","css","inline-css","nodejs","pagespeed","phantomjs"],"created_at":"2024-12-31T12:51:23.387Z","updated_at":"2024-12-31T12:51:24.213Z","avatar_url":"https://github.com/wheeyls.png","language":"JavaScript","readme":"# Eliminate render-blocking CSS in above-the-fold content\n\nIf you've run [Google Pagespeed Insights](https://developers.google.com/speed/pagespeed/insights/) on your web app, you might have seen this message:\n\n\u003e *Eliminate render-blocking JavaScript and CSS in above-the-fold content*\n\u003e\n\u003e Your page has blocking CSS resources. This causes a delay in rendering your page.\n\u003e None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.\n\nThis server generates the critical path CSS for you. It is designed to sit alongside your production app, and prepare the critical CSS asynchronously.\n\nBuilds can be started after each deploy, and a few seconds later, you'll be able to defer or asynchronously load blocking resources, and inline the critical portions for your page.\n\n## Install\n\n`npm install critical-path-server`\n\n## Usage\n\n#### Start the server\n\n    npm start\n    \u003e Listening on port: 8080\n\n#### Send a request with details about the page you want cached\n\nThe first request returns immediately, and starts generating the CSS in the background:\n\n    curl -H \"Content-Type: application/json\" -X POST -d '{ \"page\": {\"key\":\"unique-key\",\"url\":\"http://www.example.com/\",\"css\":\"https://www.example.com/style.css\"}}' localhost:5000/api/v1/css\n    \u003e Accepted\n\n#### Eventually...\n\n    curl -H \"Content-Type: application/json\" -X POST -d '{ \"page\": {\"key\":\"unique-key\",\"url\":\"http://www.example.com/\",\"css\":\"https://www.example.com/style.css\"}}' localhost:5000/api/v1/css\n    \u003e .your-critical-css {}\n\n\n## Ruby on Rails\n\nUse the Ruby on Rails client to manage rewriting and lazy-loading your other CSS assets, once the critical path has been\ncompiled and is available.\n\n[RailsCriticalCssServer](https://github.com/wheeyls/rails_critical_css_server)\n\n## Docker\n\nThis repo is setup with docker.  You can get it up and running with the following commands.\n\n```\ndocker build -t critical-css-server .\ndocker-compose up critical-css\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwheeyls%2Fcritical-css-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwheeyls%2Fcritical-css-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwheeyls%2Fcritical-css-server/lists"}