{"id":18940292,"url":"https://github.com/donejs/done-serve","last_synced_at":"2025-04-15T19:31:10.527Z","repository":{"id":57215106,"uuid":"53446399","full_name":"donejs/done-serve","owner":"donejs","description":"DoneJS development server","archived":false,"fork":false,"pushed_at":"2020-05-29T01:50:50.000Z","size":262,"stargazers_count":8,"open_issues_count":31,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T01:34:46.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/done-serve","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/donejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-08T21:27:39.000Z","updated_at":"2024-11-16T19:12:35.000Z","dependencies_parsed_at":"2022-08-26T13:41:24.522Z","dependency_job_id":null,"html_url":"https://github.com/donejs/done-serve","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donejs%2Fdone-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donejs%2Fdone-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donejs%2Fdone-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donejs%2Fdone-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donejs","download_url":"https://codeload.github.com/donejs/done-serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249138706,"owners_count":21218928,"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":[],"created_at":"2024-11-08T12:21:46.355Z","updated_at":"2025-04-15T19:31:10.243Z","avatar_url":"https://github.com/donejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# done-serve\n\n[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-611f69.svg)](https://www.bitovi.com/community/slack?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Join our Discourse](https://img.shields.io/discourse/https/forums.bitovi.com/posts.svg)](https://forums.bitovi.com/?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/donejs/done-serve/blob/master/LICENSE.md)\n[![npm version](https://badge.fury.io/js/done-serve.svg)](http://badge.fury.io/js/done-serve)\n[![Build Status](https://travis-ci.org/donejs/done-serve.svg?branch=master)](https://travis-ci.org/donejs/done-serve)\n[![Greenkeeper badge](https://badges.greenkeeper.io/donejs/done-serve.svg)](https://greenkeeper.io/)\n\nA simple development server for DoneJS projects.\n\n- [Install](#install)\n- [Usage](#usage)\n- [Options](#options)\n  - \u003ccode\u003e[-p, --port](#-p---port)\u003c/code\u003e\n  - \u003ccode\u003e[-r, --proxy](#-r---proxy)\u003c/code\u003e\n  - \u003ccode\u003e[-t, --proxy-to](#-t---proxy-to)\u003c/code\u003e\n  - \u003ccode\u003e[--proxy-no-cert-check](#--proxy-no-cert-check)\u003c/code\u003e\n  - \u003ccode\u003e[-d, --develop](#-d---develop)\u003c/code\u003e\n  - \u003ccode\u003e[-l, --no-live-reload](#-l---no-live-reload)\u003c/code\u003e\n  - \u003ccode\u003e[--live-reload-port](#--live-reload-port)\u003c/code\u003e\n  - \u003ccode\u003e[-s, --static](#-s--static)\u003c/code\u003e\n  - \u003ccode\u003e[--error-page](#--error-page)\u003c/code\u003e\n  - \u003ccode\u003e[--timeout](#--timeout)\u003c/code\u003e\n  - \u003ccode\u003e[--debug](#--debug)\u003c/code\u003e\n  - \u003ccode\u003e[--key](#--key)\u003c/code\u003e\n  - \u003ccode\u003e[--cert](#--cert)\u003c/code\u003e\n  - \u003ccode\u003e[--strategy](#--strategy)\u003c/code\u003e\n\n## Install\n\n```\nnpm install done-serve\n```\n\n## Usage\n\n```\nnode_modules/.bin/done-serve [path] [options]\n```\n\n`[path]` is the root directory. Defaults to the current working directory.\n\nTo start a full server that hosts your application from the `./dist` directory on port `3030` run:\n\n```\nnode_modules/.bin/done-serve dist --port 3030\n```\n\n## Options\n\nThe following `[options]` can be specified from the command line:\n\n### -p, --port\n\nSpecify the **port** the server should run on. If unspecified this port will be one of:\n\n* the `PORT` environment variable\n* `3030`\n\n### -r, --proxy\n\nProxy a local path (default: `/api`) to the given URL (e.g. `http://api.myapp.com`).\n\n### -t, --proxy-to\n\nSet the proxy endpoint (default: `/api`).\n\n### --proxy-no-cert-check\n\nTurn off SSL certificate verification.\n\n### -d, --develop\n\nStart a [live-reload](http://stealjs.com/docs/steal.live-reload.html) server so any code changes will be reflected immediately.\n\n### -l, --no-live-reload\n\nDisable [live-reload](http://stealjs.com/docs/steal.live-reload.html) when used with the `--develop` option.\n\n### --live-reload-port\n\nSpecify the port (a `Number`) to use for live-reload. The default port is specified in the [LiveReloadOptions](https://stealjs.com/docs/steal.live-reload.options.html) documentation.\n\n### -s, --static\n\nOnly serve static files, do not perform server-side rendering. Notably this is useful when debugging an issue in the app.\n\n### --error-page \u003cfilename\u003e\n\nWith the `--static` flag set, set an HTML page that should be sent instead of the normal error page. This is useful when you want to use Pushstate without server side rendering.\n\n### --auth-cookie\n\nSpecifies the name of a cookie that [done-ssr](https://github.com/donejs/done-ssr#options) will use to enable JavaScript Web Token (JWT) auth.\n\n### --auth-domains\n\nA comma-separated string of domain names that are authorized to receive the JWT token.  Required if `--auth-cookie` is used.\n\n### --timeout\n\nSpecify a timeout for server rendering. If the timeout is exceeded the server will return whatever has been rendered up until that point. (default: `5000`)\n\n### --debug\n\nEnable debug information in case of a timeout. The debug information will be appended to the document as a modal window and provides stack traces. Only use this flag during development.\n\n### --key, --cert\n\nProvide SSL key and certificate files. When providing these options both HTTP and HTTP2 servers will be set up, with automatic forwarding.\n\n```shell\ndone-serve --static --key ~/.localhost-ssl/private.pem --cert ~/.localhost-ssl/cert.pem\n```\n\n### --strategy\n\nProvides which rendering strategy to use. By default done-ssr waits for all asynchronous tasks to complete before serializing HTML and returning that to the browser. The options are:\n\n* **safe**: The default strategy as described above.\n* **incremental**: This rendering strategy prioritizes returning HTML to the browser sooner. Along with the HTML a shim is sent that communicates with the server to receive rendering instructions. This allows a faster rendering experience in browsers that support HTTP2. This strategy will silently fall back to the **safe** strategy if HTTP2 is not supported. Using this option requires also providing **--key** and **--cert** flags, as HTTP2 requires SSL.\n\n## Usage in Node\n\nYou can also use the server, with the same options, from JavaScript:\n\n```js\nvar server = require(\"done-serve\");\n\nserver({\npath: \"path/to/dir\"\n});\n```\n\n## Changelog\n\nSee the [latest releases on GitHub](https://github.com/donejs/done-serve/releases).\n\n## Contributing\n\nThe [DoneJS contribution guide](https://donejs.com/contributing.html) has information on getting help, reporting bugs, developing locally, and more.\n\n## License\n\n[MIT](https://github.com/donejs/done-serve/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonejs%2Fdone-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonejs%2Fdone-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonejs%2Fdone-serve/lists"}