{"id":16357793,"url":"https://github.com/kirlovon/simple-ssr","last_synced_at":"2025-03-23T01:31:54.055Z","repository":{"id":32906856,"uuid":"137929889","full_name":"Kirlovon/simple-ssr","owner":"Kirlovon","description":"Universal server-side rendering implementation for Node.js","archived":false,"fork":false,"pushed_at":"2022-02-11T00:31:26.000Z","size":2174,"stargazers_count":17,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-22T17:47:36.079Z","etag":null,"topics":["module","nodejs","npm","puppeteer","pwa","react","server-side-rendering","simple","spa","ssr","typescript","vue"],"latest_commit_sha":null,"homepage":"https://npm.im/simple-ssr","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/Kirlovon.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":"2018-06-19T18:26:15.000Z","updated_at":"2023-08-15T17:44:40.000Z","dependencies_parsed_at":"2022-07-22T04:47:54.676Z","dependency_job_id":null,"html_url":"https://github.com/Kirlovon/simple-ssr","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kirlovon%2Fsimple-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kirlovon%2Fsimple-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kirlovon%2Fsimple-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kirlovon%2Fsimple-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kirlovon","download_url":"https://codeload.github.com/Kirlovon/simple-ssr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044038,"owners_count":20551873,"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":["module","nodejs","npm","puppeteer","pwa","react","server-side-rendering","simple","spa","ssr","typescript","vue"],"created_at":"2024-10-11T02:04:08.369Z","updated_at":"2025-03-23T01:31:53.756Z","avatar_url":"https://github.com/Kirlovon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://cdn.rawgit.com/Kirlovon/Simple-SSR/master/logo/Logo.svg\" width=\"256\" height=\"192\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://img.shields.io/github/license/Kirlovon/Simple-SSR.svg\" alt=\"License\"\u003e\n\t\u003cimg src=\"https://img.shields.io/github/last-commit/Kirlovon/Simple-SSR.svg\" alt=\"Last commit\"\u003e\n\t\u003cimg src=\"https://img.shields.io/npm/v/simple-ssr.svg\" alt=\"NPM version\"\u003e\n\t\u003cimg src=\"https://img.shields.io/npm/types/simple-ssr.svg\" alt=\"Types\"\u003e\n\u003c/p\u003e\n\n## What is it?\nUniversal server-side rendering implementation for Node.js. Powered by [Puppeteer](https://github.com/GoogleChrome/puppeteer). \u003cbr\u003e\nThis library allows you to preload your web applications on the server side, and send rendered data to the user. \u003cbr\u003e\n\n_In simple terms, this module translates this:_\n```html\n\u003cdiv id=\"app\"\u003e\u003c/div\u003e\n\u003cscript\u003e\n\tdocument.getElementById('app').innerHTML = 'Hello, world!';\n\u003c/script\u003e\n```\n_To this:_\n```html\n\u003cdiv id=\"app\"\u003eHello, world!\u003c/div\u003e\n\u003cscript\u003e\n\tdocument.getElementById('app').innerHTML = 'Hello, world!';\n\u003c/script\u003e\n```\n*Note: The minimum supported Node version is **Node 7.x***\u003cbr\u003e\n\n## Features\n* Simplifies crawlers work with your **Single Page Applications** or **Progressive Web Apps**.\u003cbr\u003e\n* Allows you to cache data, optimizing the server-side rendering process. \u003cbr\u003e\n* Preload your web applications on the server-side. \u003cbr\u003e\n* TypeScript support.\n\n## Installation\n\nInstallation from the [NPM](https://www.npmjs.com/package/simple-ssr) repository:\n```\nnpm install simple-ssr --save\n```\n\n## Example\n```javascript\nconst simpleSSR = require('simple-ssr');\n\n// Puppeteer instance\nsimpleSSR.browser;\n\n// Enable requests filtering ( Default: true )\nsimpleSSR.filterRequests = true;\n\n// List of useless for DOM rendering resources\nsimpleSSR.blockedRequest = ['stylesheet', 'image'];\n\n(async() =\u003e {\n\n\t// Put there Puppeteer config\n\tawait simpleSSR.start({ headless: true });\n\n\tlet result = await simpleSSR.render('http://example.com/', {\n\t\t\n\t\t // Rendering timeout\n\t\ttimeout: 1000,\n\n\t\t// When to consider navigation succeeded.\n\t\twaitUntil: 'load',\n\n\t\t // DOM target to wait for\n\t\tdomTarget: ['body', 'h1']\n\t});\n\n\tconsole.log(result.url) // 'http://example.com/'\n\tconsole.log(result.time) // 10000\n\tconsole.log(result.html) // '\u003c!DOCTYPE html\u003e...'\n\t\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirlovon%2Fsimple-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirlovon%2Fsimple-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirlovon%2Fsimple-ssr/lists"}