Docs
backend/platforms

Storecraft Node.js Platform support

So, if you wanted to run StoreCraft on node.js, this is the platform package for you :)

What does it do exactly ?

Basically, it translates native Node http.IncomingMessage into Web API Request, and also streams result from Web API Response into Node http.ServerResponse.

usage

import 'dotenv/config';
import http from "node:http";
import { App } from '@storecraft/core'
import { NodePlatform } from '@storecraft/core/platform/node';
import { NodeLocalStorage } from '@storecraft/core/storage/node'
import { MongoDB } from '@storecraft/database-mongodb'
const app = new App(
config
)
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB())
.withStorage(new NodeLocalStorage('storage'))
.init();
http.createServer(app.handler).listen(
8000,
() => {
app.print_banner('http://localhost:8000');
}
);

All Rights Reserved, storecraft, (2025)