Socket
Socket
Sign inDemoInstall

lincd-server-utils

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lincd-server-utils


Version published
Maintainers
0
Created
Source

lincd-server-utils

provides a set of utilities for applications with a lincd-server backend.

Server

import {Server } from 'lincd-server-utils/lib/utils/Server';

Call the server from the frontend.

LinkedEmail

Send emails from anywhere in the backend.

Make sure to install an email client first, like lincd-zeptomail. By adding lincd-zeptomail to your project (in package.json), it will automatically be used as the default email client.

After this, you can send emails from anywhere in the backend.

LinkedEmail.sendEmail({
  ...
});

Setting a default provider

If you want to implement an email client, you can use LinkedEmail.setDefaultProvider to set the default email client. You can do this in the constructor of your backend provider. Here is an example:

import {LinkedEmail} from 'lincd-server-utils/lib/utils/LinkedEmail';
// import your email client from this package 
import {MyMailClient} from './utils/MyMailClient';
import {BackendProvider} from 'lincd-server-utils/lib/utils/BackendProvider';
export class MyBackendProvider extends BackendProvider {
    constructor(s) {
      super(s);
      LinkedEmail.setDefaultProvider(new MyMailClient());
    }
}

Keywords

FAQs

Package last updated on 10 Aug 2024

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