sobix

2.0.25 • Public • Published

SBX daemon system

Support only Linux & Mac OS

Packages Sbx Packages store.

Requirements

  • node >= 10.1

Getting started

Installation

$ npm install sobix -g

Available commands

sbx install [name]

Automatically installs the given package and links it to your project. It's equivalent to running the previous example. It's just instead of running two commands, you can now just:

$ sbx install sbx-react-table
$ sbx install sbx-react-table@0.0.2

sbx remove [name]

Automatically installs the given package and links it to your project.

$ sbx remove sbx-react-table

sbx publish

Automatically installs the given package and links it to your project.

$ sbx publish

Plugins

As of version 0.1.1, sbx supports plugin system. It allows you to write your own / use third-party commands to make your sbx sharpened for specific purposes.

Developers

FAQ

How's that different from react-native link

react-native link is great, but it only works for Android now. It also does not automatically add packages to your project nor support custom folder configuration. We aim to solve these issues by analyzing folders and getting maximum informations available from them. When running sbx link you don't have to think about the package exported by developer or the import path to include in your Java project.

sbx link <name> fails with ERRINVALIDPROJ

Make sure you have run npm install <name> --save first

SystemWatcher

SBX is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

SBX initial Daemon:

$ sbx init

Starting an application in production mode is as easy as: config must be placed in config directory ENV mode

$ sbx start ./config/{{env}}/daemon.json
{
  "name" : "Sobix project",
  "processes": {
    "rest": {
      "type": "cluster",
      "script" : "app-rest.js",
      "env" : {
        "NODE_ENV": "prod",
        "FORK_COUNT": 2
      },
      "serverLogs": true,
      "args": [
        "--color",
        "--stack_size=65500",
        "--nouse-idle-notification",
        "--expose-gc",
        "--max-new-space-size=2048",
        "--max-old-space-size=8192"
        
      ]
    },
    "socket": {
      "script" : "app-socket.js",
      "env" : {
        "NODE_ENV": "prod"
      },
      "args": [
        "--color",
        "--stack_size=65500"
      ]
    },
    "monit": {
      "type": "fork",
      "master": true,
      "script" : "app-monit.js",
      "env" : {
        "NODE_ENV": "prod"
      },
      "args": [
        "--color",
        "--stack_size=65500"
      ]
    }
  }
}

Managing Applications

Once applications are started you can manage them easily:

To list all running applications:

$ sbx list

Managing apps is straightforward:

$ sbx stop     <id|all>
$ sbx restart  <id|all>
$ sbx delete   <id|all>

Managing Docker Containers

Docker description

Once Docker container are started you can manage them easily:

To list all running applications:

$ sbx container list

Managing containers is straightforward:

$ sbx container stop     <id|all>
$ sbx container restart  <id|all>
$ sbx container delete   <id|all>

Versioning

This project follows semver. There are several 0.x versions published to npm registry you should not install as they belong to the previous project that was using that name 2 years ago.

License

The MIT License (MIT)

Copyright (c) 2019 Viktor Visher

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.> sbx should always be run in projects that use version control to ensure any changes made can be easily reverted

Package Sidebar

Install

npm i sobix

Homepage

sobix.io

Weekly Downloads

630

Version

2.0.25

License

MIT

Unpacked Size

71.4 kB

Total Files

31

Last publish

Collaborators

  • v.sobix