Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
A library that gives you access to the powerful Moralis Server backend from your JavaScript app. Create Server Here
For more information on Moralis and its features, see the website, the JavaScript guide, the Cloud Code guide or Web3 Reference.
The easiest way to integrate the Moralis SDK into your JavaScript project is through the npm module. However, if you want to use a pre-compiled file, you can fetch it from unpkg. The development version is available at https://unpkg.com/moralis/dist/moralis.js, and the minified production version is at https://unpkg.com/moralis/dist/moralis.min.js.
The JavaScript ecosystem is wide and incorporates a large number of platforms and execution environments. To handle this, the Moralis npm module contains special versions of the SDK tailored to use in Node.js and React Native environments. Not all features make sense in all environments, so using the appropriate package will ensure that items like local storage, user sessions, and HTTP requests use appropriate dependencies. For server side rendered applications, you may set the SERVER_RENDERING
variable to prevent warnings at runtime.
To use the npm modules for a browser based application, include it as you normally would:
const Moralis = require('moralis');
// ES6 Minimized
import Moralis from 'moralis/dist/moralis.min.js';
For server-side applications or Node.js command line tools, include 'moralis/node'
:
// In a node.js environment
const Moralis = require('moralis/node');
For React Native applications, include 'moralis/react-native.js'
:
// In a React Native application
const Moralis = require('moralis/react-native.js');
// On React Native >= 0.50 and Moralis >= 1.11.0, set the Async
const AsyncStorage = require('react-native').AsyncStorage;
Moralis.setAsyncStorage(AsyncStorage);
For WeChat miniprogram, include 'moralis/weapp'
:
// In a WeChat miniprogram
const Moralis = require('moralis/weapp');
If you want to use a pre-compiled file, you can fetch it from unpkg. The development version is available at https://unpkg.com/moralis/dist/moralis.weapp.js, and the minified production version is at https://unpkg.com/moralis/dist/moralis.weapp.min.js.
For TypeScript applications, install '@types/moralis'
:
$ npm install @types/moralis
Types are updated manually after every release. If a definition doesn't exist, please submit a pull request to [@types/moralis][types-moralis]
Moralis Server supports many [3rd Party Authenications][3rd-party-auth]. It is possible to [linkWith][link-with] any 3rd Party Authentication by creating a [custom authentication module][custom-auth-module].
FAQs
Moralis SDK for JavaScript and TypeScript
The npm package moralis receives a total of 21,700 weekly downloads. As such, moralis popularity was classified as popular.
We found that moralis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.