npm.io
3.11.0 • Published 2h ago

@mathrunet/masamune

Licence
MIT
Version
3.11.0
Deps
2
Size
218 kB
Vulns
1
Weekly
0
Stars
2

Masamune logo

Masamune Framework

Follow on GitHub Follow on X Follow on YouTube Maintained with Melos

GitHub Sponsor


[GitHub] | [YouTube] | [Packages] | [X] | [LinkedIn] | [mathru.net]


Just load the package in index.ts and pass the predefined data to the methods to implement the server side.

Also, katana_functions_firebase or masamune_functions_cloudflare can be used to execute server-side functions from methods defined on the client side, allowing for safe implementation.

Installation

Install the following packages

npm install @mathrunet/masamune

Implementation

If you want to use Firebase Functions, import @mathrunet/masamune_firebase. If you want to use Cloudflare Workers, import @mathrunet/masamune_cloudflare.

By defining individual deploy methods, you can utilize various Functions and Workers.

import * as m from "@mathrunet/masamune_firebase";

// Define [m.Functions.xxxx] for the functions to be added to Functions.
m.deploy(
    exports,
    [
        // Function for Test.
        m.TestFunctions.test,
    ],
);
import * as m from "@mathrunet/masamune_cloudflare";

// Define [m.Functions.xxxx] for the functions to be added to Workers.
export default m.deploy(
    [
        // Worker for Test.
        m.TestWorkers.test,
    ],
);

GitHub Sponsors

Sponsors are always welcome. Thank you for your support!

https://github.com/sponsors/mathrunet

Keywords