1.43.1 • Published 3 months ago

@servable/cli v1.43.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Servable CLI

!WARNING Servable is still experimental and its api may change in the future.

logo

npm Package NPM Downloads Build Status License: MIT JavaScript Style Guide

We have written a Yeoman toolbox to help get you started. We plan to add templates for most extension/customization types into this.

Install

npm install -g @servable/cli

or

yarn global add @servable/cli

Usage

Run

To launch the cli simply type:

servable

The command toolbox

Command line

Usage:
  servable:app [<destination>] [options]

Generates Servable components.

Options:
  -h,   --help                      # Print the toolbox's options and usage
        --skip-cache                # Do not remember prompt answers                                 Default: false
        --skip-install              # Do not automatically install dependencies                      Default: false
        --force-install             # Fail on install dependencies error                             Default: false
        --ask-answered              # Show prompts for already configured options                    Default: false
  -q,   --quick                     # Quick mode, skip all optional prompts and use defaults
  -o,   --open                      # Open the generated project in Visual Studio Code
  -t,   --toolboxType             # app, class, newfeature, ejectfeature, feature, feature...
  -m,   --appMasterKey              # App master key                                                 Default: MASTER_KEY_TO_CHANGE
  -j,   --appJavascriptKey          # App javascript key                                             Default: JAVASCRIPT_KEY_TO_CHANGE
  -n,   --appName                   # App name                                                       Default: No name
  -i,   --appId                     # App ID                                                         Default: no-name
  -d,   --appDescription            # App description                                                Default: A servable app
  -e,   --appEndpoint               # App endpoint                                                   Default: parse
  -d,   --appDistributionType       # App distribution type
        --appUseCache               # Use app cache                                                  Default: true
        --appUseDashboard           # Use a Servable Dashboard (recommended)                         Default: true
        --appDashboardMainPassword  # Dashboard password                                             Default: PASSWORD_TO_CHANGE
        --appDashboardPort          # Dashboard port                                                 Default: 4040
        --appDashboardMainUsername  # Dashboard username                                             Default: admin
        --appCachePort              # App cache port
        --appConfigurations         # App configuration
        --appDatabasePort           # App database port                                              Default: 27019
        --appPort                   # App port                                                       Default: 1337
        --appDatabaseType           # App database type
        --appUtilsDatabasePort      # App utils database port
        --appLiveQueryCachePort     # Livequery cache port
        --appUseLocalS3             # Use a local bucket storage (recommended)                       Default: true
        --appMinioUser              # Minio username                                                 Default: MINIO_USERNAME_TO_CHANGE
        --appMinioPassword          # Minio password                                                 Default: MINIO_PASSWORD_TO_CHANGE
        --appMinioEndpoint          # Minio endpoint                                                 Default: http://localhost:9000
        --appMinioBucket            # Minio bucket                                                   Default: primary
        --appS3ApiPort              # S3 App port                                                    Default: 9000
        --appS3UIPort               # S3 App UI port                                                 Default: 9001
  -g,   --gitInit                   # Initialize a git repository                                    Default: true
  -p,   --packageManager                # Package manager ('npm', 'yarn' or 'pnpm')                      Default: yarn
        --license                   # License                                                        Default: standalone
        --target                    # Target
        --className                 # className
        --useAppFeature            # Add class to app feature
        --targetFeature            # Target feature
        --githubUsername            # Github username                                                Default: servable-community

Arguments:
  destination  #
    The folder to create the extension in, absolute or relative to the current working directory.
    Use '.' for the current folder. If not provided, defaults to a folder with the extension display name.
    Type: String  Required: false

Example usages:
  yo servable                       # Launch the servable yeoman prompt.
  yo servable . -a              # Generate a Servable app at the current folder

Servable is a Node JS framework built on top of Express JS and Parse Server and tailored for features. It provides a concise, easy to use and scalable template to get the best of Parse Server and features.

Servable at its core is a server template that uses the toolbox-servable to orchestrate the different features used in an application. Servable streamlines the server development by separating every "groupable" logic to be a feature, so that it is organically extracted from the base code and possibly migrated into its own package. By doing so, Servable enforces a clear separation of concerns pattern out of the box.

Main features:

  • Quick start and Plug & Play Node JS framework
  • Tailored for features
  • Schema based classes and auto-migration
  • Templates for classes
  • Templates for custom features

Just like a docker image is made to be platform agnostic, a feature is designed to be independant from the current environment it's being used in. A feature might depend on other features, but it does not need to know which application it is used for, or call any of its API.

The Servable object acts as a central orchestrator. It holds references to objects every feature can access (for example the current express app, the Parse Server instance, etc). It can also be used to register special methods provided by features and that might be used by other features, without knowing the source feature of the method. For example, an emailable feature if declared in a ServableApp object will register its implementation of a sendWithTemplate method in Servable.Emailing. This API will be used by other features to send emails by following its specific specification.

Why Servable?

At @anak we created the features in our Node JS + Parse server project. What was an experience to ease the backend development quickly became a good practice that helped us keep a clean codebase. They worked so well we decided to streamline their integration with the code base for future projects. We were inspired by the powerful ways NextJs improved the React experience by providing an efficient template on top of it. Yet we did not want to hide the Parse Server framework behind ours as we truly love Parse. Servable allows to tap into all the existing and upcoming Parse features and yet it dramatically simplifies the development process. A well designed Servable project will comprise almost nothing more than the actual classes and business logic of the platform, other repetitive functions and logics will use existing features implemented by the community or entreprise-private features.

Should you use Servable?

Servable is likely a good fit for you if

  • You want to group the development of your server by capacity
  • You want to reuse a capacity (feature) over different models without copying it over and over
  • You want to make that capacity available throughout your organization or publish it on the web
  • You are building a new platform from scratch but you don't want reinvent the wheel for the usual suspects: social interactions, versionning, data consistency over deletion

...you love Parse Server There is no reason not to use Servable if you have previously used a Parse Server.

...you care about productivity and developer experience Servable provides a predetermined template that sets a clear developer's guideline

Servable in your stack

Servable comes bundled with Parse Server that sets up a working set of tables that handle users, sessions and installation. You can use it to bootstrap your platform or as a microservice that you can access through REST or GraphQL without using the _User, Session and installation tables.

License

MIT © servable-community

License

MIT

1.42.0

3 months ago

1.43.1

3 months ago

1.43.0

3 months ago

1.41.1

4 months ago

1.41.0

4 months ago

1.35.1

4 months ago

1.37.0

4 months ago

1.37.1

4 months ago

1.39.0

4 months ago

1.40.0

4 months ago

1.40.2

4 months ago

1.40.1

4 months ago

1.36.0

4 months ago

1.36.1

4 months ago

1.38.0

4 months ago

1.34.0

4 months ago

1.35.0

4 months ago

1.33.0

4 months ago

1.29.0

4 months ago

1.32.0

4 months ago

1.30.0

4 months ago

1.31.0

4 months ago

1.26.0

4 months ago

1.27.0

4 months ago

1.25.2

4 months ago

1.28.0

4 months ago

1.27.1

4 months ago

1.19.0

4 months ago

1.18.0

4 months ago

1.17.0

4 months ago

1.21.0

4 months ago

1.22.0

4 months ago

1.20.0

4 months ago

1.25.0

4 months ago

1.25.1

4 months ago

1.23.0

4 months ago

1.24.0

4 months ago

1.15.0

4 months ago

1.14.0

4 months ago

1.13.0

4 months ago

1.12.0

4 months ago

1.16.0

4 months ago

1.11.0

4 months ago

1.9.1

4 months ago

1.9.0

4 months ago

1.8.0

4 months ago

1.7.0

5 months ago

1.6.0

5 months ago

1.9.3

4 months ago

1.9.2

4 months ago

1.10.0

4 months ago

1.5.0

5 months ago

1.4.0

5 months ago

1.2.0

5 months ago

1.1.0

5 months ago

1.3.0

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago