Socket
Socket
Sign inDemoInstall

@zerva/bin

Package Overview
Dependencies
54
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @zerva/bin

🌱 Zerva Command Line Tool


Version published
Maintainers
1
Created

Readme

Source

🌱 @zerva/bin

This is a side project of Zerva

Command line tool to simplify work with Zerva. For debug and production.

In your package.json you might want to add these lines:

{
  "scripts": {
    "start": "zerva",
    "build": "zerva build",
    "serve": "node dist/main.cjs"
  }
}

Zerva uses esbuild to create both the development server code and the production code. You can take advantage of conditional building using defines. This can be used to have code that avoids certain imports or otherwise unneed stuff in production mode. I.e. in your code you can do stuff like this:

if (ZERVA_DEVELEPMENT) {
  /* do something */
}

Valid defines are:

  • ZERVA_DEVELOPMENT is true when started as zerva
  • ZERVA_PRODUCTION is true when started as zerva build

For better compatibility the defines can also be accessed as process.env.ZERVA_DEVELOPMENT and process.env.ZERVA_PRODUCTION.

npm install -D @zerva/bin @zerva/core @zerva/http 

Keywords

FAQs

Last updated on 24 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc