{"id":15680448,"url":"https://github.com/denyncrawford/deno-rollup-plugin-serve","last_synced_at":"2025-07-30T12:11:15.586Z","repository":{"id":62422033,"uuid":"357366100","full_name":"denyncrawford/deno-rollup-plugin-serve","owner":"denyncrawford","description":"Deno rebuilt/port from rollup-plugin-serve. Creates a development server for testing your front-end apps.","archived":false,"fork":false,"pushed_at":"2021-04-16T02:20:35.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T09:29:50.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/denyncrawford.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-12T23:24:01.000Z","updated_at":"2021-05-03T14:51:07.000Z","dependencies_parsed_at":"2022-11-01T17:32:13.787Z","dependency_job_id":null,"html_url":"https://github.com/denyncrawford/deno-rollup-plugin-serve","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/denyncrawford/deno-rollup-plugin-serve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denyncrawford%2Fdeno-rollup-plugin-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denyncrawford%2Fdeno-rollup-plugin-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denyncrawford%2Fdeno-rollup-plugin-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denyncrawford%2Fdeno-rollup-plugin-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denyncrawford","download_url":"https://codeload.github.com/denyncrawford/deno-rollup-plugin-serve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denyncrawford%2Fdeno-rollup-plugin-serve/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267866379,"owners_count":24157345,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"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":"2024-10-03T16:42:05.851Z","updated_at":"2025-07-30T12:11:15.558Z","avatar_url":"https://github.com/denyncrawford.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rollup plugin to serve the bundle\n\n\u003ca href=\"LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\" alt=\"Software License\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/thgh/rollup-plugin-serve/issues\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/denyncrawford/deno-rollup-plugin-serve.svg\" alt=\"Issues\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/standard/ts-standard/\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg\" alt=\"Typescript Style Guide\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://deno.land/x/deno-rollup-plugin-serve\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/deno-^1.8.1-informational.svg?style=flat-squar\" alt=\"Deno.land\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/denyncrawford/deno-rollup-plugin-serve/releases\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/release/denyncrawford/deno-rollup-plugin-serve.svg\" alt=\"Latest Version\" /\u003e\n\u003c/a\u003e\n\n[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/your-module)\n\n## Overview\n\nThis modules made for [deno-rollup](https://github.com/cmorten/deno-rollup) ***Next-generation ES module bundler for Deno ported from Rollup.***\n\n**deno-rollup-plugin-serve** is a Deno rebuilt/port from [rollup-plugin-serve](https://www.npmjs.com/package/rollup-plugin-serve). It creates a development server for testing your front-end apps.\n\n## Import\n```typescript\n# Deno Rollup v2.36.1+0.1.2+\nimport serve from 'https://deno.land/x/drollup_plugin_serve@1.1.0+0.1.3/mod.ts'\n// or\nimport serve from 'http://x.nest.land/deno-rollup-plugin-serve@4.1.0/mod.ts'\n```\n\n## Usage\n```js\n// rollup.config.js\nimport serve from '...'\n\nexport default {\n  input: 'src/main.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: ...\n  },\n  plugins: [\n    serve('dist')\n  ]\n}\n```\n\n### Options\n\nBy default it serves the current project folder. Change it by passing a string:\n```js\nserve('public')    // will be used as contentBase\n\n// Default options\nserve({\n  // Launch in browser (default: false)\n  open: true,\n\n  // Page to navigate to when opening the browser.\n  // Will not do anything if open=false.\n  // Remember to start with a slash.\n  openPage: '/different/page',\n\n  // Show server address in console (default: true)\n  verbose: false,\n\n  // Folder to serve files from\n  contentBase: '',\n\n  // Multiple folders to serve from\n  contentBase: ['dist', 'static'],\n\n  // Set to true to return index.html (200) instead of error page (404)\n  historyApiFallback: false,\n\n  // Path to fallback page\n  historyApiFallback: '/200.html',\n\n  // Options used in setting up server\n  host: 'localhost',\n  port: 10001,\n\n  // By default server will be served over HTTP (https: false). It can optionally be served over HTTPS\n  https: {\n    key: fs.readFileSync('/path/to/server.key'),\n    cert: fs.readFileSync('/path/to/server.crt'),\n    ca: fs.readFileSync('/path/to/ca.pem')\n  },\n\n  //set headers\n  headers: {\n    'Access-Control-Allow-Origin': '*',\n    foo: 'bar'\n  },\n\n  // set custom mime types, usage https://github.com/broofa/mime#mimedefinetypemap-force--false\n  mimeTypes: {\n    'application/javascript': ['js_commonjs-proxy']\n  }\n\n  // execute function after server has begun listening\n  onListening: function (server) {\n    const address = server.address()\n    const host = address.address === '::' ? 'localhost' : address.address\n    // by using a bound function, we can access options as `this`\n    const protocol = this.https ? 'https' : 'http'\n    console.log(`Server listening at ${protocol}://${host}:${address.port}/`)\n  }\n})\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nContributions and feedback are very welcome.\n\nThis project aims to stay lean and close to standards. New features should encourage to stick to standards. Options that match the behaviour of [webpack-dev-server](https://webpack.js.org/configuration/dev-server/#devserver) are always ok.\n\n## Credits\n\n- [Thomas Ghysels](https://github.com/thgh)\n- [Miguel Rangel][link-author-2]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n[link-author]: https://github.com/thgh\n[link-author-2]: https://github.com/denyncrawford\n[link-contributors]: ../../contributors\n[rollup-plugin-serve]: https://www.npmjs.com/package/rollup-plugin-serve\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenyncrawford%2Fdeno-rollup-plugin-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenyncrawford%2Fdeno-rollup-plugin-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenyncrawford%2Fdeno-rollup-plugin-serve/lists"}