open-index/open-npm huggingface dataset:
npm package: @o-town/dev-https
Description: Zero-config HTTP → HTTPS proxy for any npm run dev server
Latest version: 2.1.0

# dev-https

> Zero-config **HTTP → HTTPS** proxy for any `npm run dev` server.  
> Generates a self-signed certificate on the fly — no OpenSSL, no config files.

---

## Install

```bash
# as a dev dependency (recommended)
npm install --save-dev dev-https

# or globally
npm install -g dev-https
```

---

## Usage

### Wrap your dev command directly

```bash
# Vite  (default port 5173)
npx dev-https -p 5173 npm run dev

# Create React App  (port 3000)
npx dev-https -p 3000 npm run dev

# Next.js
npx dev-https -p 3000 npm run dev

# Webpack / Angular / any other server
npx dev-https -p 4200 npm start
```

### Add a script to `package.json`

```json
{
  "scripts": {
    "dev":       "vite",
    "dev:https": "dev-https -p 5173 npm run dev"
  }
}
```

```bash
npm run dev:https
```

### Proxy-only (dev server already running)

```bash
npx dev-https -p 3000          # wraps http://localhost:3000
```

---

## Options

| Flag | Default | Description |
|---|---|---|
| `-p, --port <n>` | `3000` | HTTP port your dev server listens on |
| `--https-port <n>` | `3443` | HTTPS port the proxy will open |
| `-h, --help` | — | Show help |

---

## How it works

```
Browser
  │  https://localhost:3443  (self-signed TLS)
  ▼
┌──────────────┐          ┌───────────────────────┐
│  dev-https   │ HTTP/WS  │  Your dev server       │
│  proxy :3443 │ ───────► │  http://localhost:PORT │
└──────────────┘          └───────────────────────┘
```

- **Self-signed cert** — generated in memory on every run, nothing written to disk.  
- **WebSocket passthrough** — Vite/webpack HMR keeps working.  
- **HTTP → HTTPS redirect** — attempted on port 80 (skipped silently if not available).

> **First visit:** your browser will show a certificate warning.  
> Click **Advanced → Proceed to localhost** to continue.

---

## Programmatic API

```js
const { createDevHttps } = require("dev-https");

const { close } = createDevHttps({
  targetPort: 5173,
  httpsPort:  3443,
  onReady({ httpsPort, targetPort }) {
    console.log(`https://localhost:${httpsPort} → http://localhost:${targetPort}`);
  },
});

// stop later
close();
```

---

## Frameworks at a glance

| Framework | Default port | Script |
|---|---|---|
| Vite | 5173 | `dev-https -p 5173 npm run dev` |
| Create React App | 3000 | `dev-https -p 3000 npm run dev` |
| Next.js | 3000 | `dev-https -p 3000 npm run dev` |
| Angular CLI | 4200 | `dev-https -p 4200 npm start` |
| Nuxt | 3000 | `dev-https -p 3000 npm run dev` |
| SvelteKit | 5173 | `dev-https -p 5173 npm run dev` |

---

## License

MIT
npm package: @o-town/devshare
Description: Local dev server with instant public sharing + QR code
Author: o-town
Latest version: 1.0.0

<p align="center">
  <img src="logo/devshareip.png" width="128" alt="DevShare Logo">
</p>

<h1 align="center">devshareip</h1>

<p align="center">
  A zero-config local development server with <strong>live reload</strong>, <strong>public tunneling</strong>, and <strong>QR<br>
  code sharing</strong> — all in one command.
</p>

<p align="center">
  <img src="https://img.shields.io/npm/v/devshare?color=cb3837&label=npm&logo=npm" alt="npm version">
  <img src="https://img.shields.io/node/v/devshare?color=339933&logo=node.js&logoColor=white" alt="Node.js version">
  <img src="https://img.shields.io/npm/dm/devshare?color=blue&label=downloads" alt="npm downloads">
  <img src="https://img.shields.io/badge/live%20reload-enabled-00e5ff" alt="Live Reload">
  <img src="https://img.shields.io/badge/tunnel-tunnelmole-7c3aed" alt="Tunnel">
  <img src="https://img.shields.io/badge/license-MIT-yellow" alt="License">
  <img src="https://img.shields.io/badge/vulnerabilities-0-brightgreen" alt="Vulnerabilities">
</p>

---

## Install

```bash
npm install
```

---

## Usage

```bash
# Basic local server (port 3000, current directory)
npm run dev

# Share publicly + show QR code in terminal
npm run dev -- --share --qrcode

# Custom port and directory
npm run dev -- -p 8080 -d ./dist

# All options
npm run dev -- --share --qrcode --port 8080 --dir ./dist --open
```

---

## Options

| Flag | Alias | Default | Description |
|------|-------|---------|-------------|
| `--port` | `-p` | `3000` | Port to serve on |
| `--dir` | `-d` | `.` | Directory to serve |
| `--share` | `-s` | `false` | Create a public tunnel URL |
| `--qrcode` | `-q` | `false` | Display QR code in terminal |
| `--open` | `-o` | `false` | Open browser on start |
| `--watch` | `-w` | `true` | Watch for file changes |
| `--no-watch` | | | Disable live reload |

---

## Features

- ⚡ **Live Reload** — WebSocket-based hot reload injected into every HTML page
- 🌐 **Public Sharing** — One flag (`--share`) exposes your server via [tunnelmole](https://tunnelmole.com)
- 📱 **QR Code** — Terminal QR code for instant mobile testing
- 📂 **Auto Directory Listing** — Browse folders with a slick dark UI
- 🎨 **Beautiful CLI** — Figlet banner, colored status, clean output

---

## Global Install

```bash
npm install -g .
devshare --share --qrcode
```

---

## License

MIT
npm package: @o-town/expose
Description: Expose localhost to *.site.com — zero dependencies, pure Node net
Latest version: 1.5.0

# expose

> Zero-dependency tunnel — expose `localhost` to `*.site.com` using only Node's built-in `net` module.

```
http://localhost:3000  →  https://abc1f3.site.com
```

---

## Install & run (client)

```bash
# Run directly with npx (no install needed)
npx expose 3000

# Or install globally
npm install -g expose
expose 3000

# With a custom subdomain
expose 3000 myapp
# → https://myapp.site.com
```

### Environment variables

| Variable        | Default          | Description                  |
|-----------------|------------------|------------------------------|
| `EXPOSE_SERVER` | `tunnel.site.com`| Tunnel server hostname       |
| `EXPOSE_PORT`   | `2000`           | Tunnel server TCP port       |

---

## Deploy the server on site.com

```bash
node server.js --http-port 80 --tunnel-port 2000 --domain site.com
```

### Flags / env vars

| Flag             | Env var       | Default     |
|------------------|---------------|-------------|
| `--http-port`    | `HTTP_PORT`   | `80`        |
| `--tunnel-port`  | `TUNNEL_PORT` | `2000`      |
| `--domain`       | `DOMAIN`      | `site.com`  |

### Keep alive with PM2

```bash
npm i -g pm2
pm2 start server.js --name expose-server -- --http-port 80 --domain site.com
pm2 save && pm2 startup
```

### nginx + TLS (recommended)

Issue a wildcard cert first:
```bash
certbot certonly --manual --preferred-challenges dns -d "*.site.com" -d "site.com"
```

Then add a site config:
```nginx
server {
    listen 443 ssl;
    server_name *.site.com;

    ssl_certificate     /etc/letsencrypt/live/site.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/site.com/privkey.pem;

    location / {
        proxy_pass         http://127.0.0.1:80;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
    }
}
```

---

## How it works

```
Browser
  │  HTTPS → nginx → port 80
  ▼
server.js  (http.Server — public)
  │  JSON line over TCP socket (port 2000)
  ▼
expose.js  (net.createConnection — your machine)
  │  http.request
  ▼
localhost:3000
```

1. **Client** opens a raw TCP socket to `site.com:2000` and sends a `register` message.
2. **Server** assigns a subdomain and replies `ready` with the public URL.
3. **Browser** hits `https://abc1f3.site.com` → nginx → server's HTTP listener.
4. **Server** sends a `request` JSON line over the TCP socket.
5. **Client** forwards it to `localhost:PORT`, gets the response, sends `response` back.
6. **Server** writes the response to the waiting browser connection.

Zero dependencies. No WebSocket. No npm installs. Pure Node.
npm package: @o-town/server
Description: A lightweight Node.js HTTP server package
Latest version: 1.1.0

# @server/core

A lightweight, zero-dependency Node.js HTTP server package with built-in routing, middleware support, and response helpers.

## Requirements

- Node.js >= 18.0.0

## Usage

```js
import { createServer } from '@server/server';

const app = createServer();

// Middleware
app.use('/', (req, res, next) => {
  console.log(`${req.method} ${req.pathname}`);
  next();
});

// Routes
app.get('/', (req, res) => {
  res.json({ message: 'Hello World!' });
});

app.get('/users/:id', (req, res) => {
  res.json({ userId: req.params.id });
});

app.post('/data', (req, res) => {
  res.json({ received: req.body });
});

app.listen(3000, () => {
  console.log('Server running on http://localhost:3000');
});
```

## API

### `createServer(options?)`

Creates and returns an HTTP server instance.

| Option     | Type       | Description                     |
|------------|------------|---------------------------------|
| `onError`  | `function` | Custom error handler `(err, req, res)` |

### Route Methods

| Method             | Description             |
|--------------------|-------------------------|
| `app.get(path, ...handlers)`    | Register GET route     |
| `app.post(path, ...handlers)`   | Register POST route    |
| `app.put(path, ...handlers)`    | Register PUT route     |
| `app.delete(path, ...handlers)` | Register DELETE route  |
| `app.use(path, ...handlers)`    | Register middleware    |

### Path Parameters

Use `:name` syntax in paths:

```js
app.get('/users/:id/posts/:postId', (req, res) => {
  const { id, postId } = req.params;
  res.json({ id, postId });
});
```

### Request Helpers

| Property      | Description                        |
|---------------|------------------------------------|
| `req.params`  | URL path parameters                |
| `req.query`   | Query string as object             |
| `req.body`    | Parsed JSON body (or raw string)   |
| `req.pathname`| URL path without query string      |

### Response Helpers

| Method              | Description                          |
|---------------------|--------------------------------------|
| `res.json(data, status?)` | Send JSON response            |
| `res.send(text, status?)` | Send plain text response      |
| `res.html(html, status?)` | Send HTML response            |

## Running the Example

```bash
node src/example.js
```

## License

MIT
npm package: @o-ui/flex
Description: A flex layout in vue
Author: o-ui
Latest version: 1.0.6

# flex
A flex layout in vue

# examples

row-start with wrap
```html
  <row-start wrap>
    <div class="demo-item"></div>
    <div class="demo-item"></div>
    <div class="demo-item"></div>
    <div class="demo-item"></div>
    <div class="demo-item"></div>
    <div class="demo-item"></div>
  </row-start>
```

row-start top align + row-unit
```html
  <row-start top>
    <span>pre label</span>
    <row-unit>
      <div>
        <div class="demo-unit"></div>
        <br>
        <div class="demo-unit"></div>
      </div>
    </row-unit>
    <span>after label</span>
  </row-start>
```

![example](https://user-images.githubusercontent.com/49022875/55307634-b4613400-548a-11e9-9f49-29c0dd1460d4.png)
npm package: @o-ui/modal
Description: A alert/confirm modal in vue
Author: o-ui
Latest version: 1.1.6

# modal
A alert/confirm modal in vue

# examples

js
```javascript
import modal from '@o-ui/modal'
Vue.use(modal)

this.$alert({
  title: 'title',
  message: 'message',
  btnText: 'btnText',
  opacity: 0.2,
  zIndex: 100
}).then(res => {
  // res: confirm/close/mask
  if (res === 'confirm') {
    // ...
  }
})
this.$confirm({
  title: 'title',
  message: 'message',
  cancelText: 'cancelText',
  confirmText: 'confirmText'
}).then(res => {
  // res: cancel/confirm/close/mask
  if (res === 'confirm') {
    // ...
  }
})
```

components
```html
<template>
  <modal title="title" :showModal="showModal" @confirm="confirm">
    <div>custom model content</div>
  </modal>
</template>
<script>
export default {
  data () {
    return {
      showModal: false
    }
  },
  methods: {
    confirm () {
      // ...
    }
  }
}
</script>
```

params

| Param | Description |
| ----- | ----------- |
| showModal | when use modal by components |
| title | modal title |
| message | modal message |
| cancelText | confirm left button text |
| confirmText | confirm right button text |
| btnText | alert button text |
| preventScroll | prevent elements scroll under the mask |
| clickMask | resolve mask click  |
| modalType | alert/confirm |
| opacity | mask opacity |
| zIndex | modal mask z-index && modal z-index |
| showMask | modal mask show/hide |
npm package: @o-ui/toast
Description: A simple toast in vue
Author: o-ui
Latest version: 1.1.4

# toast
A simple toast in vue

# examples

main.js
```javascript
import toast from '@o-ui/toast'
Vue.use(toast)
```

components
```javascript
this.$toast('Lorem ipsum dolor sit amet')

this.$toast({
  message: 'Lorem ipsum dolor sit amet',
  duration: 3000
}).then(() => {
  console.log('toast')
})
```