{"id":17993156,"url":"https://github.com/scottcorgan/pushstate-server","last_synced_at":"2025-05-15T23:06:39.795Z","repository":{"id":10296317,"uuid":"12417125","full_name":"scottcorgan/pushstate-server","owner":"scottcorgan","description":"Static file server that works with HTML5 Pushstate.","archived":false,"fork":false,"pushed_at":"2020-11-19T09:39:39.000Z","size":226,"stargazers_count":422,"open_issues_count":11,"forks_count":35,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T05:03:10.590Z","etag":null,"topics":["html5-pushstate","node","pushstate-server","server"],"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/scottcorgan.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":"2013-08-27T20:47:44.000Z","updated_at":"2025-03-07T02:41:27.000Z","dependencies_parsed_at":"2022-08-28T08:41:25.671Z","dependency_job_id":null,"html_url":"https://github.com/scottcorgan/pushstate-server","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottcorgan%2Fpushstate-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottcorgan%2Fpushstate-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottcorgan%2Fpushstate-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottcorgan%2Fpushstate-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottcorgan","download_url":"https://codeload.github.com/scottcorgan/pushstate-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"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":["html5-pushstate","node","pushstate-server","server"],"created_at":"2024-10-29T20:10:27.375Z","updated_at":"2025-05-15T23:06:34.758Z","avatar_url":"https://github.com/scottcorgan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pushstate-server\n\nStatic file server that works with HTML5 Pushstate.\n\nFor example, the route ` /some/pushstate/route ` will return the ` index.html ` file. But, ` /some/static/path/logo.png ` will return the ` logo.png ` static file.\n\n## Install\n\n```\nnpm install pushstate-server --save\n```\n\n## Usage\n\n```js\nvar server = require('pushstate-server');\n\nserver.start({\n  port: 3000,\n  directory: './public'\n});\n```\n\nor for multiple directories\n\n```js\nvar server = require('pushstate-server');\n\nserver.start({\n  port: 4200,\n  directories: ['./public', './bower_components']\n});\n```\n\nor bind to a particular host\n\n```js\nserver.start({\n  port: 4200,\n  host: '192.99.100.01',\n  directories: ['./public', './bower_components']\n});\n```\n\n\n## Global Install\n\n```\nnpm install -g pushstate-server\n```\n\n```\nusage: pushstate-server [-d directory] [-p port] [-f file]\n```\n\n## API\n\n#### start(options[, callback])\n* start the pushstate static file server\n\n##### options\n\n* `port`\n  * set the port that the server should open\n  * uses ` process.env.PORT ` if not specified, and defaults to port ` 9000 ` if none is available\n* `directory`\n  * the path to the directory where the static assets will be served\n  * defaults to ` public `\n* `file`\n  * Custom file to serve\n  * defaults to `index.html`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottcorgan%2Fpushstate-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottcorgan%2Fpushstate-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottcorgan%2Fpushstate-server/lists"}