@nexst/core
⚡ next + nest ⚡
Last updated a year ago by saltyshiomix .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nexst/core 
SYNC missed versions from official npm registry.

???? @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!

Current Tags

  • 0.0.10-alpha.9                                ...           canary (a year ago)
  • 0.0.62                                ...           latest (a year ago)

70 Versions

  • 0.0.62                                ...           a year ago
  • 0.0.61                                ...           a year ago
  • 0.0.60                                ...           a year ago
  • 0.0.59                                ...           a year ago
  • 0.0.58                                ...           a year ago
  • 0.0.57                                ...           a year ago
  • 0.0.56                                ...           a year ago
  • 0.0.55                                ...           a year ago
  • 0.0.54                                ...           a year ago
  • 0.0.53                                ...           a year ago
  • 0.0.52                                ...           a year ago
  • 0.0.51                                ...           a year ago
  • 0.0.50                                ...           a year ago
  • 0.0.49                                ...           a year ago
  • 0.0.48                                ...           a year ago
  • 0.0.47                                ...           a year ago
  • 0.0.46                                ...           a year ago
  • 0.0.45                                ...           a year ago
  • 0.0.44                                ...           a year ago
  • 0.0.43                                ...           a year ago
  • 0.0.42                                ...           a year ago
  • 0.0.41                                ...           a year ago
  • 0.0.40                                ...           a year ago
  • 0.0.38                                ...           a year ago
  • 0.0.37                                ...           a year ago
  • 0.0.36                                ...           a year ago
  • 0.0.35                                ...           a year ago
  • 0.0.34                                ...           a year ago
  • 0.0.33                                ...           a year ago
  • 0.0.32                                ...           a year ago
  • 0.0.31                                ...           a year ago
  • 0.0.30                                ...           a year ago
  • 0.0.29                                ...           a year ago
  • 0.0.27                                ...           a year ago
  • 0.0.26                                ...           a year ago
  • 0.0.25                                ...           a year ago
  • 0.0.23                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.19                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.10-alpha.9                                ...           a year ago
  • 0.0.10-alpha.7                                ...           a year ago
  • 0.0.10-alpha.6                                ...           a year ago
  • 0.0.10-alpha.5                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.5-alpha.14                                ...           a year ago
  • 0.0.5-alpha.13                                ...           a year ago
  • 0.0.5-alpha.12                                ...           a year ago
  • 0.0.5-alpha.9                                ...           a year ago
  • 0.0.5-alpha.5                                ...           a year ago
  • 0.0.5-alpha.3                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.2-alpha.1                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (19)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |