{"id":17353234,"url":"https://github.com/zacanger/luvi","last_synced_at":"2025-02-26T03:31:22.353Z","repository":{"id":57290873,"uuid":"47955647","full_name":"zacanger/luvi","owner":"zacanger","description":"Simple dev server with Markdown support, CLI, and API.","archived":false,"fork":false,"pushed_at":"2024-06-30T20:07:24.000Z","size":1126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-15T12:49:40.422Z","etag":null,"topics":["api","cli","frontend","luvi","markdown","node","server","static"],"latest_commit_sha":null,"homepage":"http://npm.im/luvi","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/zacanger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-14T06:14:07.000Z","updated_at":"2024-06-30T20:07:27.000Z","dependencies_parsed_at":"2023-02-08T08:30:27.675Z","dependency_job_id":"aa12443a-d0be-4e60-950b-6a3816023119","html_url":"https://github.com/zacanger/luvi","commit_stats":{"total_commits":258,"total_committers":2,"mean_commits":129.0,"dds":"0.015503875968992276","last_synced_commit":"2d57dacb978c3af4a39e2f9057dbf7b1a51d08ec"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fluvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fluvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fluvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fluvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacanger","download_url":"https://codeload.github.com/zacanger/luvi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219842988,"owners_count":16556513,"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":["api","cli","frontend","luvi","markdown","node","server","static"],"created_at":"2024-10-15T17:16:03.350Z","updated_at":"2024-10-15T17:16:03.850Z","avatar_url":"https://github.com/zacanger.png","language":"JavaScript","funding_links":["https://ko-fi.com/zacanger"],"categories":[],"sub_categories":[],"readme":"# luvi ♡\n\nSimple dev server with Markdown support, CLI, and API.\n\n[Donate](https://ko-fi.com/zacanger)\n\n----\n\n```shell\n$ cd /path/to/your/project\n$ luvi\n♡ luvi listening on 4444\n```\n\nBy default, `luvi` acts as a static server, serving the files in `cwd`.\n\n## Changes\n\n* 6.0.0:\n  * Removed:\n    * Port finder (undocumented)\n    * Custom 404 page (has a default)\n    * Custom onListen\n    * JSON configs (use the JS API)\n  * Added:\n    * Using through the Node API now returns an http.server\n  * Changed:\n    * `open` defaults to false\n    * Markdown support is always on\n* 5.2.0: Switch back to MIT license\n* 5.1.0: Add Markdown support\n* 5.0.0: Remove support for Node 8\n* 4.0.0: Switch to LGPL-3.0\n* 3.2.0: Un-deprecate, and add `.htm` and `.xhtml` support.\n* 3.0.0: Removed `lv` shorthand. Use a shell alias.\n* 2.1.1: Deprecated `lv` shorthand. This will still work until it's removed in\n  3.0.0. Please update any scripts using `lv` to use `luvi`.\n* 2.0.0: Switched to MIT license.\n* 0.8.6: `luvi` no longer has a proxying utility.\n* 0.9.13: `src/util` is now `src/lib`.\n* 0.9.19: `src/` is now project root (`src/lib` is now `/lib`)\n* 0.9.20: `package.json` is fixed so `luvi` works as a module again. Sorry about that!\n* 0.9.21: Please `npm rm -g luvi` and then `npm i -g luvi` to upgrade!\n\n## Installation and Usage\n\n```shell\n$ npm i -g luvi\n$ luvi [options]\n```\n\nIf you'd rather not install globally, you can use `npx`:\n`npx luvi [options]`.\n\n### [options]\n\n```\n♡ luvi (a server)\n------------------\nusage:\n    ♡ luvi           # launch server with default config\n    ♡ luvi -p 1337   # listen on specified port\n    ♡ luvi -r /path  # serve from specified dir\n    ♡ luvi -o        # open the browser after start\n    ♡ luvi -v        # luvi version\n    ♡ luvi -h        # this help\n--------------------\nsee the readme for flags and api\n```\n\n## API\n\nYou can pass an object to `luvi()` for custom settings; otherwise, these\ndefaults are applied:\n\n```javascript\nconst luvi = require('luvi')\n\nconst l = luvi({\n  name: 'luvi',\n  root: process.cwd(),\n  port: 4444\n})\n\n// returns an http.server, so you can call l.close() when you're done with it\n```\n\nThis is exactly the same as just calling `luvi()`, with no config object.\n\nThese defaults are merged with whatever you pass, so if, for example, you only\npass in a custom server name, `luvi` will still run on port 4444 and use `cwd`\nas the root to serve.\n\nMultiple servers can be launched from the same script, with different configs,\nby calling `luvi()` again with different options.\n\n#### Options\n\n* root: `string` (default: `process.cwd()`)\n  * Path where your static files are placed. Server only allows access to files in this directory.\n    Usually where you'd have `index.html`. Can be absolute or relative.\n  * Example: `root: '/path/to/document/root'`\n* port: `number` (default: `4444`)\n  * Port on which to listen.\n  * Example: `port: 3000`\n* open: `bool` (default: `false`)\n  * Open the browser on server start.\n  * Example: `open: true`\n\n## Contributing\n\nPlease do, if you'd like! Any issue reports/fixes are welcome. I am not\nconsidering adding any features.\n\n[LICENSE](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacanger%2Fluvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacanger%2Fluvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacanger%2Fluvi/lists"}