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

@parse/gcs-files-adapter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parse/gcs-files-adapter

[![Build Status](https://travis-ci.org/parse-community/parse-server-gcs-adapter.svg?branch=master)](https://travis-ci.org/parse-community/parse-server-gcs-adapter) [![codecov.io](https://codecov.io/github/parse-community/parse-server-gcs-adapter/coverage.

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

parse-server-gcs-adapter

Build
Status codecov.io NPM Version

parse-server adapter for Google Cloud Storage

installation

npm install --save @parse/gcs-files-adapter

usage with parse-server

using a config file

{
  "appId": 'my_app_id',
  "masterKey": 'my_master_key',
  // other options
  "filesAdapter": {
    "module": "@parse/gcs-files-adapter",
    "options": {
      "projectId": "projectId",
      "keyFilename": "path/to/keyfile",
      "bucket": "my_bucket",
      // optional:
      "bucketPrefix": '', // default value
      "directAccess": false // default value
    } 
  }
}

using environment variables

Set your environment variables:

GCP_PROJECT_ID=projectId
GCP_KEYFILE_PATH=projectId
GCS_BUCKET=bucketName

And update your config / options

{
  "appId": 'my_app_id',
  "masterKey": 'my_master_key',
  // other options
  "filesAdapter": "parse-server-gcs-adapter"
}

Alternatively, you can use

GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS environment variables.

passing as an instance

var GCSAdapter = require('@parse/gcs-files-adapter');

var gcsAdapter = new GCSAdapter('project', 
								'keyFilePath', 
								'bucket' , {
									bucketPrefix: '',
									directAccess: false
								});

var api = new ParseServer({
	appId: 'my_app',
	masterKey: 'master_key',
	filesAdapter: gcsAdapter
})

or with an options hash

var GCSAdapter = require('@parse/gcs-files-adapter');

var gcsOptions = {
	"projectId": "projectId",
    "keyFilename": "path/to/keyfile",
    "bucket": "my_bucket",
    "bucketPrefix": '',
	"directAccess": false
}

var gcsAdapter = new GCSAdapter(gcsOptions);

var api = new ParseServer({
	appId: 'my_app',
	masterKey: 'master_key',
	filesAdapter: gcsAdapter
})

Keywords

FAQs

Package last updated on 16 Nov 2017

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