{"id":42608280,"url":"https://github.com/zaucy/ssdom","last_synced_at":"2026-01-29T02:17:08.390Z","repository":{"id":31449371,"uuid":"35013172","full_name":"zaucy/ssdom","owner":"zaucy","description":"Tool for running a Server Side DOM.","archived":false,"fork":false,"pushed_at":"2019-06-25T02:46:47.000Z","size":35,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T10:46:10.746Z","etag":null,"topics":[],"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/zaucy.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}},"created_at":"2015-05-04T03:59:58.000Z","updated_at":"2016-02-02T18:03:32.000Z","dependencies_parsed_at":"2022-09-12T03:00:13.065Z","dependency_job_id":null,"html_url":"https://github.com/zaucy/ssdom","commit_stats":null,"previous_names":["zaucy/iojs-ssdom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zaucy/ssdom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fssdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fssdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fssdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fssdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaucy","download_url":"https://codeload.github.com/zaucy/ssdom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fssdom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28860683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":"2026-01-29T02:17:07.600Z","updated_at":"2026-01-29T02:17:08.383Z","avatar_url":"https://github.com/zaucy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ssdom - Server Side DOM\nThis is a standalone application to create a server side dom. I made it to replace my old server side dom [sdom](https://github.com/zaucy/node-sdom).\n\nssdom __heavily__ uses [jsdom](https://github.com/tmpvar/jsdom) to run the server side dom. If there are any dom features not present I'd recommend forking jsdom and implementing it there.\n\nThe goal of ssdom is to be light weight and simple. I plan to improve jsdom instead of ssdom.\n\n## How to use ssdom\n\n#### Single site command line:\n```\nssdom /my-website/main.html --port 80\n```\n#### Mutli site command line:\n\nUse `{HOSTNAME}` in the path argument to insert the hostname to the html path.\n```\nssdom /sites/{HOSTNAME}/main.html --port 80\n```\n\n#### Programatically\nProvide html path string.\n```js\nvar ssdom = require(\"ssdom\");\n\nvar server = ssdom(\"/my-website/main.html\");\nserver.listen(80);\n```\n\nssdom will then run on your script tags with the attribute `context`. Valid values for the context attribute are `server` or `server-only`. The attribute is completely optional. However if the context attribute is omitted the script will _not_ run on the server.\n\n```html\n...\n\u003cbody\u003e\n  \u003cscript context=\"server\"\u003e\n    // this script will run on both the client and server.\n  \u003c/script\u003e\n\n  \u003cscript context=\"server-only\"\u003e\n    // this script will only run on the server.\n  \u003c/script\u003e\n\n  \u003cscript\u003e\n    // this script will only run on the client.\n  \u003c/script\u003e\n\u003c/body\u003e\n...\n```\n\nIf a `server` or `server-only` script affects the document's source in anyway it will show up on the client's browser. For example if a `server-only` script appends a `\u003cdiv\u003e` to the body it will be present on the client's browser.\n\nThis allows you to handle sensitive data on the server while using the dom or just remove or add content depending on whos viewing it.\n\n## Folder Hierarchy\nCurrently ssdom uses a fixed folder hierarchy where things can be placed. Eventually these should be customizable in one way or another.\n\n```\n/my-website\n  /public\n    - Files that get served statically to the client and are sometimes loaded on the server as well.\n  /private\n    /content\n      - HTML files which can be retrieved with loadContent() as element objects.\n    /data\n      - JSON files which can be retrieved with loadData() as js objects.\n    /scripts\n      - Scripts with context server or server-only are placed in here.\n```\n\n## FAQ\n_(These aren't actually frequently asked questions. I just made them up.)_\n\n**Q:** Custom attributes are supposed to be prefixed with `data-`. Using an attribute like `context` is ilegal!\n\u003cbr\u003e\n**A:** *Valid* `context` attributes get removed before being sent to clients, so this should be a non-issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaucy%2Fssdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaucy%2Fssdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaucy%2Fssdom/lists"}