open-index/open-npm huggingface dataset:
npm package: @luzmo/nodejs-sdk
Description: Connect to the Luzmo API
Author: Luzmo Team
Latest version: 2.1.1

# Luzmo API

You can use this Node.js module to interact with the [Luzmo](https://luzmo.com) API in order to create, modify or delete datasets, dashboards or push new data into the platform in a programmatic way.

## Installation

`npm install @luzmo/nodejs-sdk`

## Usage

Include the `@luzmo/nodejs-sdk` npm package in your project. For example, to push data into the platform (triggering real-time dashboard updates):

```
const Luzmo = require('@luzmo/nodejs-sdk');

// Connect
const client = new Luzmo({
  api_key: '< your API key >',
  api_token: '< your API token >',
  host: '< https://api.luzmo.com or https://api.us.luzmo.com or your VPC-specific address>'
});

client.create(
  'data',
  {
    securable_id: '< dataset identifier >',
    data: [
      ['plaice', 2014, 2.1234, 751],
      ['plaice', 2015, 1.8765, 573]
    ]
  })
  .then(function() {
    console.log('Success!');
  })
  .catch(function(error) {
    console.error('API error:', error);
  })
  .finally(function() {
    client.close();
  });
```

See `example-embedding.js` for an example of how to use the API to securely embed dashboards in a web page (with serverside pre-filtering of the data that the end-user can query).

## TS Types

The types are defined in `types/luzmo.d.ts` and will be expanded as properties are added. However, right now (at time of writing: 25/03/2021) the IDE will prompt the user as to what type to use, but some such as `properties` are still `any` so you should check the documentation to see what to include based on the `resource` you are using. We will continue to add properties to the project.

## Documentation

The API documentation (available services and methods) can be found [here](http://developer.luzmo.com).
npm package: @luzzif/express-fs
Description: Bootstraps you express' app routing based on your project structure
Author: Federico Luzzi
Latest version: 1.0.2

[![Coverage Status](https://coveralls.io/repos/github/luzzif/express-fs/badge.svg?branch=master)](https://coveralls.io/github/luzzif/express-fs?branch=master)
[![Build Status](https://travis-ci.com/luzzif/express-fs.svg?branch=master)](https://travis-ci.com/luzzif/express-fs)

# Express FS

Express FS bootstraps your `express`' app routing based on your source
code location, enforcing a neat project structure and removing the
need for explicit routing definition.

## Installing

```
npm install @luzzif/express-fs
```

or

```
yarn add @luzzif/express-fs
```

## How to use

The library's basic concept block is the `fs-route`.

In Express FS a `fs-route` is a simple Node module which exports a handler and some
middleware functions (those are the same entities that you would normally define in
`express` in order to specify a route).

An example of an `fs-route` can be something like this:

```
// route.js

export const handler = (request, response, next) => next();
export const middleware = (request, response, next) => next();

// Alternatively, multiple middleware functions can be specified
// like this:
// export const middleware = [
//    (request, response, next) => next(),
//    (request, response, next) => next()
// ];
```

The other aspects of an `fs-route` aside for the implementation are the path and the
method: those are simply deducted by the location of the `fs-route` module.

The location should in fact reflect the wanted `fs-route`'s path, while the last part
of the location should indicate the wanted method.

Some examples to clarify the concept (the route is expressed in the format `<method>@<path>`):

-   `a/route/path/get/index.js` => `GET@/a/route/path`
-   `foo/bar/post.js` => `POST@/foo/bar`
-   `patch.js` => `PATCH@/`

In order to make Express FS register one or more `fs-routes`, simply pass the app's root
(typically `__dirname`) and the glob referencing those Node modules containing an `fs-route`
definition to the `fsRouter` function, and pass the result to `express`' `use`.

Example:

```
// server.js

const express = require("express");
const { fsRouter } = require("@luzzif/express-fs");

const app = express().use(fsRouter(__dirname, "api/**/index.js"));
```

The snippet above registers all those `fs-routes` located under the project's root
directory `api`.

By leveraging this approach, Express FS completely eliminates the need for any routing
setup and enforces a clear, straight-forward project structure.

## Donations

Please if you like my work consider donating something. Every offer helps me giving out the best software!

-   Bitcoin: `3JFXQE6mQibmrxoq3YHKqRUHAvmXxuY8r9`
-   Ethereum: `0x35E2acD3f46B13151BC941daa44785A38F3BD97A`

Thank you all <3