npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

now-static-bin

v0.2.4

Published

ZEIT Now v2.0 static binary builder

Downloads

31

Readme

now-static-bin

This package provides a builder for Zeit's Now 2.0 offering that enables running arbitrary executables in the generated lambdas.

Usage

Your now.json "builds" section should look something like this:

Example

Note: don't forget to add "version": 2 in your now.json file to use Now 2.0 explicitly.

{
  "builds": [
    {
      "src": "*.exe",
      "use": "now-static-bin",
      "config": {
        "port": 4000
      }
    }
  ]
}

Other Examples

Make sure to check the examples folder in this repo for examples in different programming languages. Below is a table that details their implementation choices.

They are also deployed on every commit to master and the latest build lives in now-static-bin-examples.now.sh.

| Example | Demo | Description | |:---------- |:---------|:----------------| | OCaml | https://now-static-bin-examples.now.sh/examples/bintry/main.exe | An OCaml static binary example server (no source available yet) | | Rust | https://now-static-bin-examples.now.sh/examples/rust/server.exe | A Rust simple-server example | | Reason | https://now-static-bin-examples.now.sh/examples/reason/main.exe | A Reason Cohttp server example that outputs request information |

Configuration Options

  • port: the port that the deployed server listens on. Defaults to 8080.
  • timeout: the timeout that the launcher waits for your server to start listening on the specified port. Defaults to 50ms.

Limitations

  • Currently only HTTP servers are supported.
  • The maxLambdaSize setting defaults to 25MB. You can override this (up to a limit of 50MB) in the builder config, e.g.:
{
  "builds": [
    {
      "src": "*.exe",
      "use": "now-static-bin",
      "config": {
        "port": 4000,
        "maxLambdaSize": "50mb"
        ^^^ NEW
      }
    }
  ]
}

Copyright and License

Copyright © 2018 António Nuno Monteiro.

Distributed under the MIT License (see LICENSE).