
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@nativescript/appwrite
Advanced tools
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Appwrite SDK for NativeScript to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
npm install @nativescript/appwrite
Register an Appwrite account here and create a project to gather your endpoint and project id.
Setup a .env
file at the root of your project with the following:
APP_WRITE_ENDPOINT=https://[YOUR_APPWRITE_ENDPOINT]
APP_WRITE_PROJECT_ID=[YOUR_APPWRITE_PROJECT_ID]
Within you webpack.config.js
you can also npm install dotenv --save-dev
and configure it to load them:
require('dotenv').config();
module.exports = (env) => {
// rest of config
}
import { Client, Account, ID } from '@nativescript/appwrite';
const client = new Client()
.setEndpoint(process.env.APP_WRITE_ENDPOINT)
.setProject(process.env.APP_WRITE_PROJECT_ID)
.setSelfSigned(true); // for development
const account = new Account(client);
const response = await account.create(ID.unique(), 'me@company.com', 'password');
console.log('Account created:', response);
const response = await account.createEmailPasswordSession('me@company.com', 'password');console.log('Logged in:', response);
const database = new Databases(client);
const documents = await database.listDocuments('database-id', 'collection-id');
console.log('documents:', documents);
const result = await database.createDocument(
'database-id',
'collection-id',
crypto.randomUUID(),
{ message: 'Hello World' }
);
console.log('Document created:', result);
Apache License Version 2.0
FAQs
Appwrite SDK for NativeScript
We found that @nativescript/appwrite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 19 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.