Pular para o conteúdo principal
ProdutosFerramentas de desktopTASTECADVisualização de desenhosTASTEFILESGerenciamento de arquivosTASTEFTPTransferência de arquivosTASTESSHEspaço de trabalho remotoTASTEZIPCompactação e extraçãoTASTEWINMGerenciamento de arquivosFerramentas para desenvolvedoresTASTECODEAmbiente de desenvolvimento integrado para RustTASTESTUDIOAmbiente integrado de desenvolvimento e testesTASTEETLIntegração de dados (ETL)ServidoresTASTEREMOTEServidor de área de trabalho remotaTASTEGEOServidor geoespacialTASTEMAILEspaço de trabalho de e-mailInvestimentosTASTESTOCKAplicativo desktop de negociação automática de açõesComeçarDownloadsDocumentaçãoComprarTodos os produtos
Marketplace
Notícias
TecnologiaNotíciasNotícias de desenvolvimento de hojeDocumentaçãoLinguagens de programaçãoRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks de front-end webNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks de apps e desktopTauriFlutterReact NativeElectronAlgoritmosFundamentos de algoritmosAlgoritmos essenciaisAlgoritmos avançadosAlgoritmos práticos
ComunidadeProjetosRegistros de desenvolvimentoPromptsProblemas de ferramentas de IAVitrineGuia da comunidade
ColaboreTransferência técnicaConstrução de siteConstrução de app de desktopPipeline de lançamento e pagamentoParceiro de vendasContato
ServiçosÁrea de trabalho remotaPacotes de instalação sob medida
TASTEDEV
Produtos

Ferramentas de desktop

TASTECADDesenhos complexos, abertos com levezaTASTEFILESSó os arquivos de que você precisa, o mais rápido possívelTASTEFTPO caminho mais organizado para seus arquivosTASTESSHEntre você e o servidor, uma conexão mais sólidaTASTEZIPCompacte mais rápido, extraia com mais segurançaTASTEWINMUm gerenciador de arquivos de dois painéis feito para o teclado

Ferramentas para desenvolvedores

TASTECODEEdite, compile, depure e teste apps Rust em uma única janelaTASTESTUDIODa edição aos testes remotos e às correções com IA aprovadasTASTEETLMova dados de olho nos valores

Servidores

TASTEREMOTEUma área de trabalho remota rodando no seu próprio servidorTASTEGEOUm servidor geoespacial compatível com o GeoServer, reconstruído em RustTASTEMAILRetome o controle do seu e-mail

Investimentos

TASTESTOCKNegociação automática de ações pelas regras que você define: quando e o quê

Começar

DownloadsVersões mais recentes de cada produtoDocsComo usar cada produtoComprarAssinaturas e licenças perpétuasTodos os produtosTodos os produtos de relance
Todos os produtos
MarketplaceNotícias
Tecnologia

Notícias

Notícias de desenvolvimento de hojeAnúncios oficiais de linguagens, frameworks, GitHub e IADocumentaçãoGuias de linguagens, frameworks e algoritmos

Linguagens de programação

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks de front-end webNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks de apps e desktopTauriFlutterReact NativeElectron

Algoritmos

Fundamentos de algoritmosAnálise de complexidade · Ordenação · Busca · Estruturas de dados básicas · Árvores e heapsAlgoritmos essenciaisBusca em grafos · Caminho mínimo e árvore geradora mínima · Programação dinâmica · Algoritmos gulosos · Divisão e conquista · BacktrackingAlgoritmos avançadosAlgoritmos de strings · Matemática e teoria dos números · Manipulação de bits · Árvores de segmentos · Union-FindAlgoritmos práticosEstratégia para entrevistas de código · Cache LRU · Limitação de taxa · Hashing consistente
Toda a documentação de desenvolvimento
Comunidade
ProjetosDescubra criadores e trabalhosRegistros de desenvolvimentoDecisões e aprendizadosPromptsInstruções reutilizáveisProblemas de ferramentas de IAProblemas e contornos de Claude, Codex, GeminiVitrineResultados concluídosGuia da comunidadeComo construímos em aberto
Colabore
Transferência técnicaApps nativos em Rust e eguiConstrução de site10 idiomas, contas, documentação e downloadsConstrução de app de desktopRust e egui, sem WebViewPipeline de lançamento e pagamentoAssinatura, MSI, deb, rpm, AppImage, hashesParceiro de vendasRecomende e ganhe 30%ContatoDesenvolvimento, parcerias e investimento
Serviços
Área de trabalho remotaAcesse seu computador pelo navegadorPacotes de instalação sob medidaSó o necessário, configurações pré-carregadas
Comprar
PT
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Entrar
Entrar
TASTEDEV

De pequenas ferramentas a um desenvolvimento melhor.

support@tastedev.netApoiar TASTEDEV
ProdutosLinha de produtosComprarDocsDownloadsMarketplaceSuporte
ComunidadeProjetosRegistros de desenvolvimentoPromptsProblemas de ferramentas de IAVitrine
PolíticasSobre nósPolítica de privacidadeTermos de usoTermos de assinaturaReembolsoDiretrizes da comunidade
ContaEntrarCriar conta
Visitantes
Hoje
Ontem
Visualizações totais
Empresa
GXSOFT
Representante
CHOI YOUNG GU
Número de registro comercial
853-44-00368
Endereço
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefone
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsável pela privacidade
CHOI YOUNG GU

© 2026 TASTEDEVAs informações dos produtos se baseiam em fontes de desenvolvimento verificadas.Lançado · em melhoria

Documentação de NestJS · Express
NestJS · Express
Getting Started with NestJS and ExpressProject StructureCore ConceptsValidation, Configuration and DatabasesTestingDeployment
Discussões

Guia de NestJS · Express · 1/6

Getting Started with NestJS and Express

Por enquanto, este capítulo está disponível apenas em inglês.

This chapter builds the smallest possible web server with Express, then creates a NestJS project with the Nest CLI and runs its development server. It ends with a few notes on editor setup.

How Express and NestJS relate

Express is a minimal web framework for Node.js: it gives you routing and middleware and leaves the rest of the architecture to you. NestJS is a server framework that adds structure on top, with modules, dependency injection and decorators. Nest delegates HTTP handling to a platform adapter, and the default adapter is Express (@nestjs/platform-express). A Nest application is therefore an Express server under the hood, and you can use Express middleware directly. Swapping the adapter for Fastify is also supported.

Both need Node.js. Check what you have installed; for a fresh install, the LTS release from nodejs.org is the safe choice.

node --version
npm --version

A minimal Express server

Create a package.json in an empty folder and install Express.

mkdir hello-express
cd hello-express
npm init -y
npm install express

Add an index.js file. express() creates the application, app.get registers a handler for GET requests to a path, and app.listen opens a port.

// index.js
const express = require("express");

const app = express();
const port = process.env.PORT || 3000;

app.get("/", (req, res) => {
  res.send("Hello World!");
});

app.listen(port, () => {
  console.log(`Listening on http://localhost:${port}`);
});

Run it with node index.js and open http://localhost:3000. During development, Node's built-in watch mode restarts the server whenever you save a file.

node --watch index.js

Creating a project with the Nest CLI

Nest projects are usually created with the official command-line tool, the Nest CLI. Install it globally and run nest new.

npm i -g @nestjs/cli
nest new hello-nest
cd hello-nest
npm run start:dev

nest new asks which package manager to use (npm, yarn or pnpm), scaffolds a project with TypeScript and testing already configured, and installs dependencies. If you prefer not to install globally, npx @nestjs/cli new hello-nest does the same. npm run start:dev runs nest start --watch, which recompiles and restarts on every change. Once it is up, http://localhost:3000 responds with "Hello World!".

The entry point is src/main.ts. NestFactory.create builds the application from the root module, , and starts listening.

Dúvidas sobre este capítulo?
Próximo capítuloProject Structure
AppModule
// src/main.ts
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(process.env.PORT ?? 3000);
}
bootstrap();

The generated package.json includes the scripts you will use most.

ScriptWhat it does
npm run start:devDevelopment server in watch mode
npm run start:debugWatch mode with the debugger enabled
npm run buildCompile TypeScript into dist
npm run start:prodRun the compiled dist/main.js
npm run test / npm run test:e2eUnit tests / end-to-end tests
npm run lintRun ESLint

Adding your first endpoint

The CLI's generate command (g for short) creates files and registers them in the nearest module.

nest generate controller hello
# short form
nest g co hello

Edit the generated src/hello/hello.controller.ts. When a handler returns an object, Nest serializes it as JSON.

import { Controller, Get, Query } from "@nestjs/common";

@Controller("hello")
export class HelloController {
  @Get()
  greet(@Query("name") name?: string) {
    return { message: `Hello, ${name ?? "world"}!` };
  }
}
curl "http://localhost:3000/hello?name=Nest"
# {"message":"Hello, Nest!"}

Editor setup

VS Code supports TypeScript out of the box, so completion and type checking work immediately. Nest projects ship with ESLint and Prettier configuration; install both extensions and enable format on save. To debug, start the server with npm run start:debug and attach the editor's Node.js debugger. WebStorm and other editors work the same way.

Summary

  • Express is a lightweight framework built around routing and middleware; NestJS runs on Express by default and adds structure.
  • An Express server takes npm install express and a few lines of code.
  • A Nest project is created and started with npm i -g @nestjs/cli, nest new and npm run start:dev.
  • nest g generates building blocks such as controllers and wires them into a module for you.

0 comentários

Principais comentáriosMais recentes primeiro

Fazer login · Faça login para deixar um comentário.