Giter VIP home page Giter VIP logo

appc.loki.js's Introduction

LokiJS Connector for Arrow

An Arrow connector that works with the file-based version of LokiJS.

1. Installation

You can use

npm install appc.loki.js

or add

"appc.loki.js" : "1.0.0"

to you packacge.json file.

2. Configuration

Register the connector in your appc.json file :

"dependencies": {
    ...
    "connector/appc.loki.js": "^0.0.5"
  },
  ...

Set the configuration object in your conf/default.js file :

    connectors: {
        'appc.loki.js': {
            db : '<nameOfYourDatabase>',
			path: '/<pathToDb>/',
			lokiConfiguration: {
				autoload : true,
				serializationMethod: 'pretty'
			},
			modelAutogen: true,
			generateModelsFromSchema: true
        }
    }

3. Usage

Take a look at all available options and query parameters, in the API documentation section of your arrow administration. Options are available under the group appc.loki.js.

Example Model Usage

For example, if you want to persist the user model, set it such as:

var User = Arrow.Model.extend('user', {
    fields: {
        first_name: { type: String },
        last_name: { type: String },
        email: { type: String },
        role: { type: String },
        username: { type: String }
    },
    connector: ‘appc.loki.js'
});

4. Development

This section is for individuals developing the LokiJS Connector and not intended for end-users.

npm install
node app.js

For development purposes use development branch only.

5. Testing

To test the connector, just run

npm test

appc.loki.js's People

Contributors

vik10101 avatar

Watchers

James Cloos avatar Toshko Popov avatar Emil Ruzhenov avatar Marin Vasilev avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.