Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ordentco/ramenbox

Package Overview
Dependencies
Maintainers
5
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ordentco/ramenbox

```` javascript const providers = [ '@adonisjs/framework/providers/AppProvider', '@adonisjs/auth/providers/AuthProvider', '@adonisjs/bodyparser/providers/BodyParserProvider', '@adonisjs/drive/providers/DriveProvider',

  • 2.1.69
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

/# Adonis Ramenbox

Installation

Adonis Ramenbox requires Adonisjs v4 to run.

Install the PeerDependencies in your host application

    "@adonisjs/bodyparser": "^2.0.5",
    "@adonisjs/cors": "^1.0.7",
    "@adonisjs/drive": "^1.0.4",
    "@adonisjs/fold": "^4.0.9",
    "@adonisjs/generic-exceptions": "^3.0.1",
    "@adonisjs/validator": "^5.0.6",
    "adonis-bumblebee": "^2.1.0",
    "adonis-lucid-filter": "^1.0.5",
    "@ordentco/adonis-drive": "^1.0.2",
    "@slynova/flydrive": "^1.0.3",
    "@slynova/flydrive-gcs": "^1.0.3"

set your config/drive.js

'use strict'

const Helpers = use('Helpers')
const Env = use('Env')

module.exports = {
  /*
  |--------------------------------------------------------------------------
  | Default disk
  |--------------------------------------------------------------------------
  |
  | The default disk is used when you interact with the file system without
  | defining a disk name
  |
  */
  default: 'local',

  disks: {
    /*
    |--------------------------------------------------------------------------
    | Local
    |--------------------------------------------------------------------------
    |
    | Local disk interacts with the a local folder inside your application
    |
    */
    local: {
      driver: 'local',
      config: {
        root: Helpers.tmpPath()
      }
    },

    /*
    |--------------------------------------------------------------------------
    | S3
    |--------------------------------------------------------------------------
    |
    | S3 disk interacts with a bucket on aws s3
    |
    */
    s3: {
      driver: 's3',
      config: {
        key: Env.get('S3_KEY'),
        secret: Env.get('S3_SECRET'),
        bucket: Env.get('S3_BUCKET'),
        region: Env.get('S3_REGION')
      }
    },

    gcs: {
      driver: 'gcs',
      config: {
        keyFilename: Env.get('GCS_KEY_FILE_NAME'), // path to json file
        bucket: Env.get('GCS_BUCKET')
      }
    }
  }
}

add provider to start/app.js

const providers = [
  ...
  '@adonisjs/validator/providers/ValidatorProvider',
  '@ordentco/adonis-drive/providers/DriveProvider',
  'adonis-bumblebee/providers/BumblebeeProvider',
  'adonis-lucid-filter/providers/LucidFilterProvider',
  ...
]

Controller

const RamenController = require('../../../packages/ramenbox/src/Controller/RamenController')
Model
const RamenController = require('../../../packages/ramenbox/src/Controller/RamenController')
Properties
static get properties () {
		return ['id', 'username', 'password', 'email', 'created_at', 'updated_at', 'image']
    }
Slug
static get slug(){
        return 'email'
    }
Rules
    static get rules(){
        return {
            post: {
                email: 'required|email|unique:users,email',
                username: 'required'
            }
        }
    }
Relations
    static get relations(){
        return ['profiles', 'tokens']
    }
Sanitize
    static get sanitize(){
        return {
            post: {
                'email': 'normalize_email'
            }
        }
    }
Transformer
    const RamenTransformer = require('../../../packages/ramenbox/src/Controller/RamenController')

Keywords

FAQs

Package last updated on 09 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc