π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.
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!
Install Node-Boot core dependencies
npm install @node-boot/core @node-boot/config @node-boot/context reflect-metadata winston
Install Server Layer: Fastify
npm install @node-boot/fastify-server fastify
Setup Node-Boot Application
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);
}
}
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}`);
});
Add Application Configuration File
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:

Last updated