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 @vivaxy/here with all npm packages installed. Try it out:

var here = require("@vivaxy/here")

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

@vivaxy/here v3.4.0

local static server



Build Status NPM Version NPM Downloads MIT License

Local static server

Everything start from here.

Node.js >= 8.0


  • Look up available port automatically, which means multiple instances without specifying port.

  • Custom routes by scripting here.js.

  • Live reload.

  • Support https.

  • Add ip address to your server, which makes your server available to other devices.

  • Resolve get, post... every method into local files, for ajax.

  • Respond files without extension as application/json for ajax.

  • Open default browser after server launched.

  • When the server is on, press enter will open the browser.


[sudo] npm install -g @vivaxy/here


In your local folder, type here and it goes!

Advanced Usage

Specify port to 8888

here -p 8888


here --port 8888

Default port is 3000.

Switch protocol to https

here -S


here --ssl

Open Gzip

here -G


here --gzip

Specify server root directory

here -d test


here --directory test

Default directory is ./.

Watch file changes, once files changed, reload pages

here -w 3


here --watch

Default interval is 0 second.

Recommend to set reload interval to page reload time.

Do not open the browser

here -s


here --silent

Output log

here -l


here --log 0

Middleware support

Write here.js in server base directory.

let db = {
  tobi: {
    name: 'tobi',
    age: 21
  loki: {
    name: 'loki',
    age: 26
  jane: {
    name: 'jane',
    age: 18

module.exports = [
    method: 'get',
    path: '/pets',
    data () {
      let names = Object.keys(db);
      return => {
        return db[name];
    method: 'get',
    path: '/pets/:name',
    data () {
      let name =;
      let pet = db[name];
      if (!pet) {
        return {
          error: `cannot find pet ${name}`
      } else {
        return pet;

See koa-router document for more detail.

Prior Art

  • puer not support post, respond files without extension as application/octet-stream

  • anywhere not support post, and not support reload

  • browsersync not support post, respond files without extension as application/octet-stream

Change Log

Change Log



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