Node-Boot Framework
  • 👋Welcome to Node-Boot
  • 💡Why Node-Boot?
    • No CLI
    • No Boilerplate
    • Standardisation at its core
    • Spring-Boot Features Parity
  • 🥇Mission
  • 🚀Getting Started
  • Letter to Developers
    • 📝Letter to Node.Js Developers
    • 📝Letter to Web3 Developers
    • 📝Letter to Spring-Boot Developers
    • 📝Letter to Node.Js Framework Developers
  • Fundamentals
    • 🧩Architecture
      • Overview
      • Bootstrap
      • Lifecycle
      • Application Context
    • 🪄Core Features
      • Dependency Injection
      • Bean and Configuration
      • Configuration Properties
        • Static Configuration
        • Reading Configuration
        • Writing Configuration
        • Defining Configuration
        • Configuration Properties
      • Controller
        • Available Decorators
        • Custom Decorator
        • Versioning
      • Service
      • Component
      • Logging
      • Error Handling
      • Transactions
        • Transaction Principles
        • Transactions vs Concurrency
        • 🙈Using Transactions
      • Middleware/Interceptors
      • Authorization
      • Marshalling vs Unmarshalling
    • 🗝️Auto-Configuration
    • 🔐Security
  • Servers
    • 🚂Servers Concept
    • 🚃Available Servers
      • Fastify
      • Express
      • Koa
    • 🔌Integrate Server?
  • Starters
    • 🏗️Starters Overview
    • 🎁Available Starters
      • Persistency
      • Validations
      • Actuator
      • Open API
      • Redis
Powered by GitBook
On this page
  • Highlight
  • Application structure

Getting Started

Let's be productive!

Before getting started, we encourage you to unfold our Letters to Developers to gain a better understanding of our motivation.

To embark on your Node-Boot journey, the optimal starting point is to browse our marketplace and select a Software Template that aligns with your project needs.

Once chosen, you can then specify your preferred application server, enabling you to swiftly initiate your development journey with a fully functional sample application. By building and running this selected template, you'll seamlessly immerse yourself in exploring the comprehensive features offered by Node-Boot.

We firmly advocate for this approach as it establishes a standardised foundation from the outset, ensuring consistency and efficiency throughout your development process.

Highlight

Our Software Templates are crafted to swiftly generate sample applications equipped with all the essentials for a seamless start. However, we value transparency and encourage you to comprehend the underlying steps, as we firmly believe that knowledge forms the bedrock of success.

Let's assume you have a penchant for fast applications, and you've opted for Fastify as your chosen application server framework.

Alright, first things first: it's dependency installation time! Get ready to play "Fetch the Dependencies" - it's like a scavenger hunt, but for code!

  1. Install Node-Boot core dependencies

npm install @node-boot/core @node-boot/config @node-boot/context reflect-metadata winston 
pnpm add @node-boot/core @node-boot/config @node-boot/context reflect-metadata winston
yarn add @node-boot/core @node-boot/config @node-boot/context reflect-metadata winston
  1. Install Server Layer: Fastify

npm install @node-boot/fastify-server fastify
pnpm add @node-boot/fastify-server fastify
yarn add @node-boot/fastify-server fastify
  1. Setup Node-Boot Application

app.ts
import "reflect-metadata";
import {NodeBoot, NodeBootApp, NodeBootApplication, NodeBootAppView} from "@node-boot/core";
import {FastifyServer} from "@node-boot/fastify-server";

@NodeBootApplication()
export class SampleApp implements NodeBootApp {

    start(port?: number): Promise<NodeBootAppView> {
        return NodeBoot.run(FastifyServer, port);
    }
}
server.ts
import {SampleApp} from "./app";

// Starts the Node-Boot server with the application deployed
new SampleApp()
    .start()
    .then(app => {
        console.debug(`SampleApp started successfully at port ${app.appOptions.port}`);
    })
    .catch(reason => {
        console.error(`Error starting SampleApp: ${reason}`);
    });
  1. Add Application Configuration File

app-config.yaml
node-boot:
    # App configurations
    app:
        name: "sample-service"
        platform: "sample"
        environment: "development"
        defaultErrorHandler: false
        port: 3000

Application structure

A typical Node-Boot project has the following structure:

PreviousMissionNextLetter to Node.Js Developers

Last updated 1 year ago

🚀