Actinium Core

A Node/Express framework with built-in Parse Cloud API.

Actinium == The Node Express API framework for the Reactium platform. Use me whenever I need a Mongo backed API.

Actinium is built on a core framework, designed to quickly and easily create your Node/Express API with Parse. The local development and build configuration that comes out of the box is meant to be upgradeable, so long as your application was built off a semver (Semantic Version) that is minor-version compatible with the current.

Even for larger version steps, we are going to attempt to describe (or automate) much of the migration from one version of Actinium core to another.

Updating core is performed with the reactium command:

reactium update

Hacking Core

Core functionality of the Node.js / Express server running Parse Server can be found in the actinium_modules directory. These modules are installed from the Reactium registry much in the way node_modules are installed via npm. Just like you would not modify the contents of modules in node_modules, you should not modify actinium_modules.

The core modules are maintained in the Actinium Modules project on Github. Please feel free to fork and make a Pull-Request if you have any good general purpose ideas.

Actinium's processes and cloud functions are heavily hooked and can easily be altered with plugins and middleware.

Any updates you make to actinium_modules will be ovewritten any time you run reactium install, much as npm install will overwrite node_modules.

Environment Variables

Actinium primarily relies on environment variables for configuration. To ease the pain of setting EVs on every local launch, you can set them in the /src/env.json and/or /src/env.remote.json

ACTINIUM_ENV_ID

To select the /src/env.remote.json file simply pass remote as the value. You can create any number of env files with the same file naming pattern.

ACTINIUM_ENV_FILE

There maybe instances where your env file is not stored in the Actinium src directory. You can tell Actinium where to load it from by supplying the full path to the file.

Default: /src/env.json

APP_ID

Unique ID for the Parse App. Used when connecting via client SDKs.

Default: Actinium

APP_NAME

Display name used in the Parse Dashboard.

Default: Actinium

APP_PORT

The application port where Actinium will run from.

Note: Some hosts like Heroku will automatically set this value.

CONTENT_NAMESPACE

Used as a uuidv5 namespace for the purpose of generating uuids identifying content types.

Given the namespace uuid + a content type slug, will always yield the same exact uuid for that slug and namespace, therefore you can always derive the same uuid given the content type slug.

DATABASE_URI

The MongoDB connection string. Supports standalone, replicant set, and shared clusters.

See: MongoDB Connection String URI Format for details

LIVE_QUERY_SERVER

Default: true

LIVE_QUERY_SETTINGS

Object containing key value pairs specifying configuration for Live Queries

"LIVE_QUERY_SETTINGS": {
    "classNames": ["Changelog"]
},

LOG

By setting this value to false your server will no longer emit event logs.

Default: true

LOG_LEVEL

The level of detail and frequency at which system logs are emitted.

MASTER_KEY

A key that overrides all permissions. Used for operations that require untethered access to the database.

Important: Keep this secret and use it only on the server.

NO_DOCS

When you deploy Actinium to a production server it's a good idea to disable the /docs route. Unless of course your app is expressly an API and you want to expose the docs for documentation purposes.

Default: false

PARSE_ALLOW_CLIENT_CLASS_CREATION

Set this to true if you want grant client SDKs to the ability to create new collections. This is generally not a common practice as clients may not take into consideration permissions and capabilities.

Default: false

PARSE_DASHBOARD

When you deploy Actinium to a production server it's a good idea to disable the Parse Dashboard.

Default: true

PARSE_DASHBOARD_USERS

Object Array container user, pass key value pairs.

"PARSE_DASHBOARD_USERS": [
    {
        "user": "admin",
        "pass": "admin"
    }
],

Last updated