
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
nestjs-temporal
Advanced tools
A progressive Node.js framework for building efficient and scalable server-side applications.
import { Module } from '@nestjs/common';
import { TemporalModule } from 'nestjs-temporal';
@Module({
imports: [
TemporalModule.forRoot({
taskQueue: 'default',
workflowsPath: require.resolve('./temporal/workflow'),
}),
TemporalModule.registerClient(),
],
})
export class AppModule {}
import { Injectable } from '@nestjs/common';
import { Activities, Activity } from 'nestjs-temporal';
import { ActivityInterface } from '@temporalio/activity';
@Injectable()
@Activities()
export class GreetingActivity {
constructor() {}
@Activity()
async greeting(name: string): Promise<string> {
return 'Hello ' + name;
}
}
export interface IGreetingActivity extends ActivityInterface {
greeting(name: string): Promise<string>;
}
import { proxyActivities } from '@temporalio/workflow';
// Only import the activity types
import { IGreetingActivity } from '../activities';
const { greeting, reverseGreeting } = proxyActivities<IGreetingActivity>({
startToCloseTimeout: '1 minute',
});
export async function example(name: string): Promise<string> {
return await greeting(name);
}
import { Controller, Post } from '@nestjs/common';
import { Connection, WorkflowClient } from '@temporalio/client';
import { InjectTemporalClient } from 'nestjs-temporal';
@Controller()
export class AppController {
constructor(
@InjectTemporalClient() private readonly temporalClient: WorkflowClient,
) {}
@Post()
async greeting() {
const handle = await this.temporalClient.start('example', {
args: ['Temporal'],
taskQueue: 'default',
workflowId: 'wf-id-' + Math.floor(Math.random() * 1000),
});
console.log(`Started workflow ${handle.workflowId}`);
}
}
Nest is MIT licensed.
FAQs
temporal for nestjs framework
The npm package nestjs-temporal receives a total of 6,735 weekly downloads. As such, nestjs-temporal popularity was classified as popular.
We found that nestjs-temporal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.