New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@ax2/xms-api-core

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ax2/xms-api-core

XMS2 API CORE documentation

npmnpm
Version
0.12.2-alpha.12
Version published
Weekly downloads
46
2200%
Maintainers
1
Weekly downloads
 
Created
Source

XMS API CORE

XMS2 API CORE documentation

Setup

Install the module

yarn add @ax2/xms-api-core

Necessary Env variables

OptionDescription
NODE_ENVlocal, prod or dev
LANG_FALLBACKdefault lang to use (default ='en')
LANG_KEYSmultilang keys (example 'fr,en')
MEDIA_DIRECTORYDirectory on gcp to upload media
GCP_PROJECT_IDProject ID from gcp
GCP_CREDENTIALS_PATHPath for gcp credentials (necessary for non gcp micro-services)
STORAGE_BUCKETName of the bucket to upload on gcp storage
MEDIA_RESIZINGSet to 1 to resize media on upload
MYSQL_DB_NAMEMySQL database name
MYSQL_DB_USERMySQL user
MYSQL_DB_PASSWORDMySQL password
MYSQL_DB_HOSTMySQL host (default: 127.0.0.1)
MYSQL_DB_PORTMysql Port (default: 3306)
REDIS_HOSTRedis Host (default: 127.0.0.1)
REDIS_PORTRedis Port (default: 6379)
REDIS_PASSWORDRedis Password (default: '')
REDIS_PREFIXRedis prefix for cache key (default: '')
REDIS_ENABLESet to 1 to enable Redis (default: disabled)
REDIS_ENABLESet to 1 to enable Redis (default: disabled)
SENTRYSentry DSN

Load the module into the core

import * as CORE from '@ax2/xms-api-core';
class Article extends CORE.Citadelle implements CORE.ModelItem {}

import { Citadelle, ModelItem } from '@ax2/xms-api-core';
class Article extends Citadelle implements ModelItem {}

Available class

// Models function
import { Citadelle, ModelItem, ModelError,  } from '@ax2/xms-api-core';

// Helpers function
import { FunctionKit, StorageAPI, DateKit, Utils, MigrationQuery, MigrateHelper, Sentry, Response, Message } from '@ax2/xms-api-core';

// Services function
import { FileService, FilterService } from '@ax2/xms-api-core';

FAQs

Package last updated on 22 Mar 2022

Related posts