# now-serve

> Single command static hosting

Latest version **0.5.1** (published 2016-10-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install now-serve
pnpm add now-serve
yarn add now-serve
bun add now-serve
```

Provides the command `ns`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2016-10-13 |
| First published | 2016-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | leo |
| Maintainers | leo, rauchg |

## Links

- npm: https://www.npmjs.com/package/now-serve
- Repository: https://github.com/zeit/now-serve
- Homepage: https://zeit.co/now
- Issues: https://github.com/zeit/now-serve/issues
- npm.io page: https://npm.io/package/now-serve

## Dependencies (7)

- [md5](https://npm.io/package/md5.md) ^2.1.0
- [tmp](https://npm.io/package/tmp.md) 0.0.29
- [args](https://npm.io/package/args.md) 2.1.0
- [walk](https://npm.io/package/walk.md) 2.3.9
- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [hasbin](https://npm.io/package/hasbin.md) 1.2.3
- [fs-extra](https://npm.io/package/fs-extra.md) 0.30.0

## Recent versions

- 0.5.1 (latest) — 2016-10-13
- 0.5.0 — 2016-09-28
- 0.4.0 — 2016-08-31
- 0.3.1 — 2016-07-29
- 0.3.0 — 2016-07-24
- 0.2.0 — 2016-06-26
- 0.1.0 — 2016-04-28

## README

# now-serve

[![Build Status](https://travis-ci.org/zeit/now-serve.svg?branch=master)](https://travis-ci.org/zeit/now-serve)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![Slack Channel](https://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)

> This packages makes it very easy to [share directories](https://zeit.co/blog/serve-it-now) using [now](https://zeit.co/now)!

## How it works

When running the `ns` command, a temporary directory gets created. Within that directory, now-serve will insert a brand new `package.json` that conforms to [now's requirements](https://zeit.co/now#get-started) and therefore contains a start script that runs a new instance of [list](https://github.com/zeit/list) when being executed on our servers.

All of this happens completely automatically. So after running the command, the only thing you need to do is wait a few seconds until your files have been deployed and share the link! :boom:

## Usage

Install it (needs at least node v6)

```bash
$ npm install now-serve -g
```

Run it

```bash
$ ns <file | dir> [options] 
```

You can find a list of all options [below](#options).

### Options

| Usage                          | Description |
| ------------------------------ | ----------- |
| -h, --help                     | Output all available options |
| -V, --version                  | The version tag of the now-serve instance on your device |
| &#8209;c,&nbsp;&#8209;&#8209;cmd&nbsp;[command]            | The command that should be run when starting |
| -n, --name [name]              | The name for your deployment |
| &#8209;p,&nbsp;&#8209;&#8209;packages&nbsp;&#60;names&#62; | Custom packages to add to dependencies: `"gulp, koa"` |
| -a, --arguments <handles>      | A string containing arguments that will be passed on to now: `"force, debug"` (basically the names of the flags but without dashes) |
| -s, --single                   | Serve single page apps with only one `index.html` in the root directory |

## Contribute

1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall now-serve if it's already installed: `npm uninstall now-serve -g`
3. Link it to the global module directory: `npm link`
4. Transpile the source code and watch for changes: `npm start`

Yeeha! Now can use the `ns` command everywhere.

---
_Source: https://npm.io/package/now-serve · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
