Back to articles
Appwrite Has a Free Backend-as-a-Service — Auth, Database, Storage, and Functions in One Self-Hosted Platform

Appwrite Has a Free Backend-as-a-Service — Auth, Database, Storage, and Functions in One Self-Hosted Platform

via Dev.to WebdevAlex Spinov

Why Appwrite? Appwrite is an open-source Firebase alternative you can self-host. Auth, database, storage, functions, and realtime — all with a clean SDK. docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume " $( pwd ) " /appwrite:/usr/src/code/appwrite:rw \ appwrite/appwrite:latest Authentication import { Client , Account } from ' appwrite ' const client = new Client () . setEndpoint ( ' https://cloud.appwrite.io/v1 ' ) . setProject ( ' YOUR_PROJECT_ID ' ) const account = new Account ( client ) // Sign up await account . create ( ' unique() ' , ' user@example.com ' , ' password ' , ' John Doe ' ) // Login await account . createEmailPasswordSession ( ' user@example.com ' , ' password ' ) // OAuth await account . createOAuth2Session ( ' google ' , ' https://yourapp.com/success ' ) Database import { Databases , ID } from ' appwrite ' const db = new Databases ( client ) // Create document await db . createDocument ( ' mydb ' , ' posts ' , ID . unique (), { ti

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles