Socket
Socket
Sign inDemoInstall

cordova-resource-server

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-resource-server

redirect resource "www/index.html" to website which publish in device storage


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

cordova-resource-server

Cordova Plugin to automatically update and off-line running.
Redirect resource "www/index.html" to website which publish in device storage.
It not offer unzip and fetch fearure.

Usage

  • app.js
var contextPath = (cordova.file.dataDirectory).replace('file://', '') + 'web';
var contextPort = 10429;
var servePath = (cordova.file.dataDirectory).replace('file://', '') + 'resources';
var servePort = 10433;
ResourceServer.start(contextPath, contextPort, servePath, servePort, function () {
    // ...
}, function (err) {
    // ...
});

Resource Directory

Offline files location.

  • http://localhost:10429

Context Directory

Local website location.

Request Path

Sample

/data/data/com.app.domain/files
├─resources
  ├─test.mp3
├─web
  ├─index.html

// index.html (http://localhost:10429)
<audio src="http://localhost:10433/resources/test.mp3" controls/>

iOS

developing

FAQs

Package last updated on 06 Sep 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc