Socket
Socket
Sign inDemoInstall

@corvina/corvina-device-sdk

Package Overview
Dependencies
17
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @corvina/corvina-device-sdk

Corvina NodeJS Device SDK


Version published
Maintainers
2
Created

Readme

Source

Corvina Device SDK

Installation

Usage in a Nestjs application

In your app module, import the device client module:

import { DeviceClientModule } from '@corvina/corvina-device-sdk';

@Module({
  imports: [DeviceClientModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

In your main.ts you can start the device using the DeviceRunner service. This service reads the configuration from a .env file.

import { DeviceRunnerService } from '@corvina/corvina-device-sdk';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(3000);

  app.get(DeviceRunnerService).run();
}
Using in a plain nodejs application

Install @nestjs/common peer dependency and dotenv to load .env into process.env:

yarn install @nestjs/common dotenv

Run the device using the given runner:

import 'dotenv/config'
import { DeviceRunnerService, DeviceService } from '@corvina/corvina-device-sdk';

const devRunner = new DeviceRunnerService(new DeviceService());

devRunner.run();

Change Log

See Changelog for more information.

Contributing

Contributions welcome! See Contributing.

Author

Arrigo Zanette

License

Licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Last updated on 13 Jul 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc