space-lb2

messaging

space-node

This documentation is deprecated
Please see the new LoopBack documentation site.
Skip to end of metadata
Go to start of metadata

Icon

Before running this generator, you must create an application using slc loopback, the application generator.

Then you must run the command from the root directory of the application.

SYNOPSIS

Adds a new data source definition to a LoopBack application.

slc loopback:datasource [options] [<name>]

OPTIONS

-h, --help
Print the generator's options and usage.

--skip-cache
Do not remember prompt answers. Default is false.

--skip-install
Do not automatically install dependencies. Default is false.

ARGUMENTS

You can optionally provide the name of the data source to create as an argument.  If you do, the tool will use that as the default when it prompts for the name.

INTERACTIVE PROMPTS

The tool will prompt you for:

  • Name of the new data source.  If you supplied a name on the command-line, just hit Enter to use it.
  • Connector to use for the data source.
Icon

You must install the connector for the new data source; for example: npm install --save loopback-connector-mysql

OUTPUT

This adds an entry to datasources.json with the specified settings.