🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@nexst/core

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nexst/core

⚡ next + nest ⚡

latest
Source
npmnpm
Version
0.0.62
Version published
Maintainers
1
Created
Source

😎 @nexst/core 😎

NexstAppModule & NextModule

In the server/app.module.ts:

import {
  Module,
  MiddlewareConsumer,
} from '@nestjs/common';
import {
  NexstAppModule,
  NextModule,
} from '@nexst/core';
import { AppController } from './app.controller';

@Module({
  imports: [
    NextModule,
  ],
  controllers: [
    AppController,
  ],
})
export class AppModule extends NexstAppModule {
  configure(consumer: MiddlewareConsumer) {
    super.configure(consumer);

    // additional configurations here
  }
}

Then, use render() function where you want to SSR:

import {
  Controller,
  Get,
  Req,
  Res,
} from '@nestjs/common';
import {
  Request,
  Response,
} from 'express';
import { NextService } from '@nexst/core';

@Controller('auth')
export class AuthController {
  constructor(private readonly nextService: NextService) {}

  @Get('register')
  public async showRegisterPage(@Req() req: Request, @Res() res: Response) {
    return await this.nextService.render(req, res, 'auth/register');
  }
}

This will render pages/auth/register.tsx!

Keywords

nexst

FAQs

Package last updated on 01 May 2019

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