Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including anywhere with all npm packages installed. Try it out:

anywhere lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("anywhere/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

anywhere v1.5.0

Run static file server anywhere

Anywhere 随启随用的静态文件服务器

Running static file server anywhere. 随时随地将你的当前目录变成一个静态文件服务器的根目录。

Installation

Install it as a command line tool via npm -g.

npm install anywhere -g

Execution

$ anywhere
// or with port
$ anywhere -p 8000
// or start it but silent(don't open browser)
$ anywhere -s
// or with hostname
$ anywhere -h localhost -p 8888
// or with folder
$ anywhere -d ~/git/anywhere
// or enable html5 history
$ anywhere -f /index.html

Help

$ anywhere --help
Usage:
  anywhere --help // print help information
  anywhere // 8000 as default port, current folder as root
  anywhere 8888 // 8888 as port
  anywhere -p 8989 // 8989 as port
  anywhere -s // don't open browser
  anywhere -h localhost // localhost as hostname
  anywhere -d /home // /home as root
  anywhere -f /index.html  // Enable html5 history,the index is /index.html

Visit

http://localhost:8000

执行命令后,默认浏览器将为您自动打开主页。

License

The MIT license.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free