Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverify

Runs browserify in a server

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

serverify

Starts a server running browserify so you can quickly develop web applications using the node.js/npm package system.

Usage

Here is how to run the example in test/. First, install the serverify command globally:

sudo npm install -g serverify

Next, go into the test directory and run it:

cd test/
serverify

And that should start the server! You can navigate your browser to http://localhost:8080/index.html to view the test page.

Configuration

By default, serverify bundles up the file called index.js in the directory which it is run from and servers up static files contained in the ./www/ directory. The bundle is served at /bundle.js. You can configure this behavior using the following parameters:

  • entry: (Default: ./index.js) The entry point for the project.
  • www: (Default: ./www/) The static HTML directory
  • bundle: (Default: /bundle.js) The web path to serve up the bundled project on.
  • port: (Default: 8080) The port on which the server is hosted.

These parameters can be changed in one of the following ways:

  • You can override them via the command line, eg:

      serverify --entry test.js
    
  • You can create a file called .serverify in the same directory as your project which contains a JSON string describing the values for the parameters:

    `echo "{port:9001}" > .serverify && serverify`
    

Why not just run browserify --watch?

This only solves half the problem. You still need to launch a web server to host the files so that you can view them in your browser.

Why not use browserify-server?

browserify-server is a bit more substantial and offers some extra features, like autogenerated scaffolding, configurable Makefiles and the ability to bundle images and HTML. If you want this stuff, then by all means go use it. On the other hand, if you just want to run a server with browserify and nothing else, then serverify may be a better solution.

What about browservefy?

Because I only found out about browservefy recently. Though very similar to serverify, it has a few small differences:

  • browservefy is not carefully documented. (Though one could debate how important this is for such a trivial task)
  • It also creates a default index.html, which you may or may not want.
  • Also you can't specify the path for static HTML files, which again you may or may not care about.

Credits

(c) 2013 Mikola Lysenko. MIT License

FAQs

Package last updated on 04 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc