पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.1.0

pocketbase_server_flutter

फ्लटर के साथ एंड्रॉइड/आईओएस से पॉकेटबेस सर्वर को सीधे शुरू करें

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
138
लाइक
35
Pub अंक
130

पैकेज इंस्टॉल करें

flutter pub add pocketbase_server_flutter

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

pocketbase_server_flutter पैकेज डेवलपर्स को Android, iOS, Web, macOS, Windows और Linux पर Flutter एप्लिकेशन में सीधे PocketBase सर्वर लॉन्च करने की अनुमति देता है। यह डेटाबेस सर्वर को ऐप में एम्बेड करके बैकएंड सेटअप को सरल बनाता है, जो प्रोटोटाइपिंग, स्थानीय विकास या हल्के बैकएंड की आवश्यकताओं के लिए आदर्श है। पैकेज प्रत्येक प्लेटफॉर्म के लिए नेटिव बाइनरी का उपयोग करता है, जिससे सुगमता और प्रदर्शन सुनिश्चित होता है। यह वास्तव में ऐप्स के लिए उपयोगी है जिन्हें बाहरी सर्वर इंफ्रास्ट्रक्चर के बिना रियल-टाइम डेटा, प्रमाणीकरण और फ़ाइल स्टोरेज की आवश्यकता होती है।

उपयोग

  • एम्बेडेड बैकएंड के साथ Flutter ऐप्स का स्थानीय विकास
  • त्वरित फुल-स्टैक एप्लिकेशन प्रोटोटाइपिंग
  • सिंक क्षमता वाले ऑफलाइन-प्रथम एप्लिकेशंस
  • पूर्ण-स्टैक Flutter के शैक्षिक प्रोजेक्ट
  • एम्बेडेड डेटाबेस के साथ सरल CRUD एप्लिकेशन

मुख्य विशेषताएँ

  • फ्लटर ऐप में पॉकेटबेस सर्वर एम्बेड करता है
  • मोबाइल और डेस्कटॉप सहित सभी प्रमुख प्लेटफॉर्म का समर्थन करता है
  • स्वचालित सर्वर स्टार्टअप और प्रबंधन
  • रियल-टाइम डेटाबेस और प्रमाणीकरण
  • हल्का और एकीकरण में आसान

इनके लिए उपयुक्त

  • फ्लटर विकासकर्ता पूर्ण-स्टैक एप्लिकेशन बना रहे हैं
  • बैकएंड इंटीग्रेशन सीख रहे शुरुआती लोग
  • टीम में त्वरित एमवीपी प्रोटोटाइपिंग
  • स्थानीय डेटाबेस और रियल-टाइम फीचर्स की आवश्यकता वाले प्रोजेक्ट
  • न्यूनतम सर्वर रखरखाव की आवश्यकता वाले ऐप्स

विचार योग्य बातें

  • उत्पादन-पैमाने के डेप्लॉयमेंट्स के लिए उपयुक्त नहीं
  • बंडल्ड सर्वर बाइनरी के कारण ऐप का आकार बढ़ा है
  • सर्वर लाइफसाइकिल के सावधानीपूर्वक निपटान की आवश्यकता होती है
  • बादल-आधारित समाधानों की तुलना में सीमित स्केलेबिलिटी
  • अगर सार्वजनिक रूप से उजागर किया जाता है, तो सुरक्षा जोखिम हो सकते हैं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Pocketbase Server Flutter

pocketbase_server version

Run Pocketbase Server directly from Android/IOS with flutter

Screenshot 2023-09-16 at 12 09 12 PM

Usage

Checkout Pocketbase Server example app

Start pocketbaseServer
PocketbaseServerFlutter.start(
  superUserEmail: "test@user.com",
  superUserPassword: "password",
  hostName: await PocketbaseServerFlutter.localIpAddress,
  port: "8080",
);
Advanced Usage
// Get path to load resources using `path_provider`
final Directory staticDir = await getTemporaryDirectory();

// Directory to load static files (Optional)
final String staticFolder = "${staticDir.path}/pb_static/";

// Directory to load js hook files (Optional)
final String hooksFolder = "${staticDir.path}/pb_hooks/";

// Directory to save sqlite files and default data
final String dataFolder = "${staticDir.path}/pb_data/";

// add `pb_static` and `pb_hooks` folder in assets of your project, and load all files from assets to given path
await PocketbaseServerFlutter.copyAssetsFolderToPath(
  path: staticFolder,
  assetFolder: "pb_static",
  overwriteExisting: true,
)

await PocketbaseServerFlutter.copyAssetsFolderToPath(
  path: hooksFolder,
  assetFolder: "pb_hooks",
  overwriteExisting: true,
);

PocketbaseServerFlutter.start(
  superUserEmail: "test@user.com",
  superUserPassword: "password",
  hostName: await PocketbaseServerFlutter.localIpAddress,
  port: "8080",
  enablePocketbaseApiLogs: true,
  dataPath: dataFolder,
  staticFilesPath: staticFolder,
  hookFilesPath: hooksFolder,
);

Stop pocketbaseServer

PocketbaseServerFlutter.stop();

Listen to pocketbaseServer events, setup eventCallback

PocketbaseServerFlutter.setEventCallback(
    callback: (event, data){
        // Handle event and data
    },
);

Some helper methods

// To check if pocketBase is running (not reliable)
PocketbaseServerFlutter.isRunning

// To check pocketbaseMobile version
PocketbaseServerFlutter.pocketbaseMobileVersion

// To get the ipAddress of mobile ( to run pocketbase with this hostname )
PocketbaseServerFlutter.localIpAddress

Mobile Setup

  • IOS

If getting error related to Undefined symbol, Make sure to run pod install on ios directory, open IOS project in XCode

Click on Pods, Then select pocketbase_server_flutter from Targets list, and select Build Phases

Screenshot 2023-09-16 at 11 19 30 AM

Then in Link Binary With Libraries section, click on + button and search for libresolv.tbd and choose from result and click on Add

image

  • Android

Should work out of the box

Desktop Setup

Desktop requires pocketbaseExecutable path in start()

To get pocketbaseExecutable in app, add the executable in Assets and on runtime copy it from assets to another path using path_provider Or download the executable on Runtime

  • MacOS

Edit your Runner/**.entitlements file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>com.apple.security.app-sandbox</key>
		<false />
		<key>com.apple.security.cs.allow-jit</key>
		<true />
		<key>com.apple.security.network.client</key>
		<true />
		<key>com.apple.security.network.server</key>
		<true />
	</dict>
</plist>
  • Windows, Linux

Should work out of the box

Resources

https://pocketbase.io/

Built with: pocketbase_mobile

Note

This is for running Pocketbase server from mobile, to connect with pocketbase server, use official pocketbase client plugin

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।